@PHPUnit60Migration-risky_whitespaces.test-out.php 1.3 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. }