@PHPUnit56Migration-risky.test-out.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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->assertNull($foo);
  13. $this->assertInternalType('array', $foo);
  14. $this->assertNan($foo);
  15. $this->assertIsReadable($foo);
  16. }
  17. /**
  18. * Foo.
  19. */
  20. function test_php_unit_no_expectation_annotation_32()
  21. {
  22. $this->expectException(\FooException::class);
  23. $this->expectExceptionCode(123);
  24. bbb();
  25. }
  26. /**
  27. * Foo.
  28. */
  29. function test_php_unit_no_expectation_annotation_43()
  30. {
  31. $this->expectException(\FooException::class);
  32. $this->expectExceptionMessageRegExp('/foo.*$/');
  33. $this->expectExceptionCode(123);
  34. ccc();
  35. }
  36. public function test_mock_54()
  37. {
  38. $mock = $this->createMock("Foo");
  39. }
  40. public function test_php_unit_expectation_52() {
  41. $this->expectException("RuntimeException");
  42. $this->expectExceptionMessage("Msg");
  43. $this->expectExceptionCode(123);
  44. }
  45. public function test_php_unit_expectation_56() {
  46. $this->expectException("RuntimeException");
  47. $this->expectExceptionMessageRegExp("/Msg.*/");
  48. $this->expectExceptionCode(123);
  49. }
  50. }