@PHPUnit60Migration-risky_whitespaces.test-in.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. use PHPUnit_Framework_Assert;
  3. use PHPUnit_Framework_BaseTestListener;
  4. use PHPUnit_Framework_TestListener;
  5. use PHPUnit_Aaa;
  6. use PHPUnit_Aaa_Bbb;
  7. use PHPUnit_Aaa_Bbb_Ccc;
  8. use PHPUnit_Aaa_Bbb_Ccc_Ddd;
  9. use PHPUnit_Aaa_Bbb_Ccc_Ddd_Eee;
  10. class FooTest extends \PHPUnit_Framework_TestCase {
  11. public function test_dedicate_assert($foo) {
  12. $this->assertTrue(is_null($foo));
  13. $this->assertTrue(is_array($foo));
  14. $this->assertTrue(is_nan($foo));
  15. $this->assertTrue(is_readable($foo));
  16. }
  17. /**
  18. * Foo.
  19. * @expectedException FooException
  20. * @expectedExceptionCode 123
  21. */
  22. function test_php_unit_no_expectation_annotation_32()
  23. {
  24. bbb();
  25. }
  26. /**
  27. * Foo.
  28. * @expectedException FooException
  29. * @expectedExceptionMessageRegExp /foo.*$/
  30. * @expectedExceptionCode 123
  31. */
  32. function test_php_unit_no_expectation_annotation_43()
  33. {
  34. ccc();
  35. }
  36. public function test_mock_54()
  37. {
  38. $mock = $this->getMockWithoutInvokingTheOriginalConstructor("Foo");
  39. }
  40. public function test_php_unit_expectation_52() {
  41. $this->setExpectedException("RuntimeException", "Msg", 123);
  42. }
  43. public function test_php_unit_expectation_56() {
  44. $this->setExpectedExceptionRegExp("RuntimeException", "/Msg.*/", 123);
  45. }
  46. }