Issues

ZF2-45: Zend/Rest/RouteTest

Issue Type: Unit Tests: Problem Created: 2011-08-04T02:17:39.000+0000 Last Updated: 2012-03-10T16:54:23.000+0000 Status: Resolved Fix version(s): Reporter: Timothy Crider (timcrider) Assignee: Matthew Weier O'Phinney (matthew) Tags: -

Related issues: Attachments:

Description

Using phpunit 3.5.14, assertType is throwing deprecation errors.

The following is the error message given by phpunit --verbose:

Deprecated PHPUnit features are being usedzf2/tests/Zend/Rest/RouteTest.php:(between 77 and 101) - () will be removed in PHPUnit 3.6 and should no longer be used. assertInternalType() should be used for asserting internal types such as "integer" or "string" whereas assertInstanceOf() should be used for asserting that an object is an instance of a specified class or interface.

zf2/tests/Zend/Rest/RouteTest.php:(between 103 and 113) - () will be removed in PHPUnit 3.6 and should no longer be used. assertInternalType() should be used for asserting internal types such as "integer" or "string" whereas assertInstanceOf() should be used for asserting that an object is an instance of a specified class or interface.

zf2/tests/Zend/Rest/RouteTest.php:(between 118 and 128) - () will be removed in PHPUnit 3.6 and should no longer be used. assertInternalType() should be used for asserting internal types such as "integer" or "string" whereas assertInstanceOf() should be used for asserting that an object is an instance of a specified class or interface.

zf2/tests/Zend/Rest/RouteTest.php:(between 130 and 140) - () will be removed in PHPUnit 3.6 and should no longer be used. assertInternalType() should be used for asserting internal types such as "integer" or "string" whereas assertInstanceOf() should be used for asserting that an object is an instance of a specified class or interface.

zf2/tests/Zend/Rest/RouteTest.php:(between 142 and 154) - () will be removed in PHPUnit 3.6 and should no longer be used. assertInternalType() should be used for asserting internal types such as "integer" or "string" whereas assertInstanceOf() should be used for asserting that an object is an instance of a specified class or interface.

zf2/tests/Zend/Rest/RouteTest.php:(between 156 and 168) - () will be removed in PHPUnit 3.6 and should no longer be used. assertInternalType() should be used for asserting internal types such as "integer" or "string" whereas assertInstanceOf() should be used for asserting that an object is an instance of a specified class or interface.

zf2/tests/Zend/Rest/RouteTest.php:(between 170 and 181) - () will be removed in PHPUnit 3.6 and should no longer be used. assertInternalType() should be used for asserting internal types such as "integer" or "string" whereas assertInstanceOf() should be used for asserting that an object is an instance of a specified class or interface.

zf2/tests/Zend/Rest/RouteTest.php:(between 183 and 194) - () will be removed in PHPUnit 3.6 and should no longer be used. assertInternalType() should be used for asserting internal types such as "integer" or "string" whereas assertInstanceOf() should be used for asserting that an object is an instance of a specified class or interface.

zf2/tests/Zend/Rest/RouteTest.php:(between 196 and 207) - () will be removed in PHPUnit 3.6 and should no longer be used. assertInternalType() should be used for asserting internal types such as "integer" or "string" whereas assertInstanceOf() should be used for asserting that an object is an instance of a specified class or interface.

zf2/tests/Zend/Rest/RouteTest.php:(between 209 and 220) - () will be removed in PHPUnit 3.6 and should no longer be used. assertInternalType() should be used for asserting internal types such as "integer" or "string" whereas assertInstanceOf() should be used for asserting that an object is an instance of a specified class or interface.

zf2/tests/Zend/Rest/RouteTest.php:(between 222 and 233) - () will be removed in PHPUnit 3.6 and should no longer be used. assertInternalType() should be used for asserting internal types such as "integer" or "string" whereas assertInstanceOf() should be used for asserting that an object is an instance of a specified class or interface.

zf2/tests/Zend/Rest/RouteTest.php:(between 235 and 245) - () will be removed in PHPUnit 3.6 and should no longer be used. assertInternalType() should be used for asserting internal types such as "integer" or "string" whereas assertInstanceOf() should be used for asserting that an object is an instance of a specified class or interface.

zf2/tests/Zend/Rest/RouteTest.php:(between 247 and 258) - () will be removed in PHPUnit 3.6 and should no longer be used. assertInternalType() should be used for asserting internal types such as "integer" or "string" whereas assertInstanceOf() should be used for asserting that an object is an instance of a specified class or interface.

zf2/tests/Zend/Rest/RouteTest.php:(between 260 and 271) - () will be removed in PHPUnit 3.6 and should no longer be used. assertInternalType() should be used for asserting internal types such as "integer" or "string" whereas assertInstanceOf() should be used for asserting that an object is an instance of a specified class or interface.

zf2/tests/Zend/Rest/RouteTest.php:(between 273 and 284) - () will be removed in PHPUnit 3.6 and should no longer be used. assertInternalType() should be used for asserting internal types such as "integer" or "string" whereas assertInstanceOf() should be used for asserting that an object is an instance of a specified class or interface.

zf2/tests/Zend/Rest/RouteTest.php:(between 286 and 298) - () will be removed in PHPUnit 3.6 and should no longer be used. assertInternalType() should be used for asserting internal types such as "integer" or "string" whereas assertInstanceOf() should be used for asserting that an object is an instance of a specified class or interface.

zf2/tests/Zend/Rest/RouteTest.php:(between 320 and 331) - () will be removed in PHPUnit 3.6 and should no longer be used. assertInternalType() should be used for asserting internal types such as "integer" or "string" whereas assertInstanceOf() should be used for asserting that an object is an instance of a specified class or interface.

zf2/tests/Zend/Rest/RouteTest.php:(between 333 and 344) - () will be removed in PHPUnit 3.6 and should no longer be used. assertInternalType() should be used for asserting internal types such as "integer" or "string" whereas assertInstanceOf() should be used for asserting that an object is an instance of a specified class or interface.

zf2/tests/Zend/Rest/RouteTest.php:(between 346 and 357) - () will be removed in PHPUnit 3.6 and should no longer be used. assertInternalType() should be used for asserting internal types such as "integer" or "string" whereas assertInstanceOf() should be used for asserting that an object is an instance of a specified class or interface.

zf2/tests/Zend/Rest/RouteTest.php:(between 368 and 380) - () will be removed in PHPUnit 3.6 and should no longer be used. assertInternalType() should be used for asserting internal types such as "integer" or "string" whereas assertInstanceOf() should be used for asserting that an object is an instance of a specified class or interface.

zf2/tests/Zend/Rest/RouteTest.php:(between 382 and 394) - () will be removed in PHPUnit 3.6 and should no longer be used. assertInternalType() should be used for asserting internal types such as "integer" or "string" whereas assertInstanceOf() should be used for asserting that an object is an instance of a specified class or interface.

zf2/tests/Zend/Rest/RouteTest.php:(between 396 and 407) - () will be removed in PHPUnit 3.6 and should no longer be used. assertInternalType() should be used for asserting internal types such as "integer" or "string" whereas assertInstanceOf() should be used for asserting that an object is an instance of a specified class or interface.

zf2/tests/Zend/Rest/RouteTest.php:(between 427 and 438) - () will be removed in PHPUnit 3.6 and should no longer be used. assertInternalType() should be used for asserting internal types such as "integer" or "string" whereas assertInstanceOf() should be used for asserting that an object is an instance of a specified class or interface.

zf2/tests/Zend/Rest/RouteTest.php:(between 440 and 451) - () will be removed in PHPUnit 3.6 and should no longer be used. assertInternalType() should be used for asserting internal types such as "integer" or "string" whereas assertInstanceOf() should be used for asserting that an object is an instance of a specified class or interface.

zf2/tests/Zend/Rest/RouteTest.php:(between 480 and 492) - () will be removed in PHPUnit 3.6 and should no longer be used. assertInternalType() should be used for asserting internal types such as "integer" or "string" whereas assertInstanceOf() should be used for asserting that an object is an instance of a specified class or interface.

zf2/tests/Zend/Rest/RouteTest.php:(between 494 and 506) - () will be removed in PHPUnit 3.6 and should no longer be used. assertInternalType() should be used for asserting internal types such as "integer" or "string" whereas assertInstanceOf() should be used for asserting that an object is an instance of a specified class or interface.

Comments

Posted by Matthew Weier O'Phinney (matthew) on 2011-08-04T13:18:48.000+0000

ZF1 standardizes on the PHPUnit 3.4 series; these deprecation notices were introduced during the PHPUnit 3.5 series. (ZF2 uses PHPUnit 3.5, and we're steadily updating these assertions.)

Posted by Timothy Crider (timcrider) on 2011-08-04T14:17:31.000+0000

I thought I submitted this bug for ZF2. I also submitted a patch updating the assertions for ZF2. I created this bug in order to have a branch name to pull request for.

https://github.com/zendframework/zf2/…

Did I do this incorrectly?

Posted by Matthew Weier O'Phinney (matthew) on 2011-08-04T14:23:43.000+0000

My bad -- I missed the ZF2- prefix!

BTW, this route may or may not exist once refactoring of the MVC is done. The reason is that it may be easier to handle the request-method-specific items within the controller itself rather than in the routing. This allows using literal route matching, which will be much faster, and also more flexible for cases of subresources, etc.

That said, I'll still honor the pull request.

Posted by Timothy Crider (timcrider) on 2011-08-04T14:26:25.000+0000

Awesome,

I was worried I had done something wrong. This is the first time I've publicly contributed to a project, and was using this ticket as my first try and working with a setup like this. I picked the easiest thing I could quickly find, just to get familiar with the process.

Posted by Robert Basic (robertbasic) on 2012-03-10T16:54:23.000+0000

The pull request for this one https://github.com/zendframework/zf2/pull/313 was merged and closed, so I'm resolving this one as fixed. Also, the Zend/Rest tests are all green.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts