Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qa: PhpUnit >= 9.0 Call to undefined method assertInternalType #229

Open
ZVanoZ opened this issue Nov 4, 2021 · 1 comment
Open

qa: PhpUnit >= 9.0 Call to undefined method assertInternalType #229

ZVanoZ opened this issue Nov 4, 2021 · 1 comment
Labels
Bug Something isn't working

Comments

@ZVanoZ
Copy link
Contributor

ZVanoZ commented Nov 4, 2021

Bug Report

Q A
Version(s) 2.14.x 2.13.4 2.13.3 2.13.2 2.13.1 2.13.0 2.12.0

After commit #166

Summary

Some unit test use method "self::assertInternalType(...)" for check type of result.
This method is deprecated in PHPUnit 8 and removed in PHPUnit 9.
See and use instead

    assertIsArray()
    assertIsBool()
    assertIsFloat()
    assertIsInt()
    assertIsNumeric()
    assertIsObject()
    assertIsResource()
    assertIsString()
    assertIsScalar()
    assertIsCallable()
    assertIsIterable()
    assertIsNotArray()
    assertIsNotBool()
    assertIsNotFloat()
    assertIsNotInt()
    assertIsNotNumeric()
    assertIsNotObject()
    assertIsNotResource()
    assertIsNotString()
    assertIsNotScalar()
    assertIsNotCallable()
    assertIsNotIterable()

Current behavior

Totally 4 usages in

            test/unit/Adapter/Driver/IbmDb2  (2 usages found)
                ConnectionIntegrationTest.php  (2 usages found)
                    24 self::assertInternalType('string', $connection->getCurrentSchema());
                    52 self::assertInternalType('resource', $connection->getResource());
            test/unit/Adapter/Driver/Oci8  (2 usages found)
                ConnectionIntegrationTest.php  (2 usages found)
                    21 self::assertInternalType('string', $connection->getCurrentSchema());
                    51 self::assertInternalType('resource', $connection->getResource());

Example of test output for TESTS_LAMINAS_DB_ADAPTER_DRIVER_OCI8

Testing started at 11:20 ...
[docker://zvanoz/laminas-db-test-by-docker:php7.4-apache-buster/]:php -dxdebug.remote_enable=1 -dxdebug.remote_mode=req -dxdebug.remote_port=9000 -dxdebug.remote_host=172.18.0.1 /var/www/vendor/phpunit/phpunit/phpunit --configuration /var/www/phpunit.xml --teamcity
PHPUnit 9.5.10 by Sebastian Bergmann and contributors.

Error : Call to undefined method LaminasTest\Db\Adapter\Driver\Oci8\ConnectionIntegrationTest::assertInternalType()
 /var/www/test/unit/Adapter/Driver/Oci8/ConnectionIntegrationTest.php:21

Error : Call to undefined method LaminasTest\Db\Adapter\Driver\Oci8\ConnectionIntegrationTest::assertInternalType()
 /var/www/test/unit/Adapter/Driver/Oci8/ConnectionIntegrationTest.php:51

How to reproduce

Run tests and see result.

Expected behavior

All tests is pass.

@ZVanoZ ZVanoZ added the Bug Something isn't working label Nov 4, 2021
@Ocramius
Copy link
Member

Ocramius commented Nov 4, 2021

Likely because IbmDb2 and Oci8 tests never run in CI :|

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants