@PHPUnit52Migration-risky.test-out.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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->assertTrue(is_readable($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->setExpectedExceptionRegExp(\FooException::class, '/foo.*$/', 123);
  32. ccc();
  33. }
  34. public function test_mock_54()
  35. {
  36. $mock = $this->getMockWithoutInvokingTheOriginalConstructor("Foo");
  37. }
  38. public function test_php_unit_expectation_52() {
  39. $this->expectException("RuntimeException");
  40. $this->expectExceptionMessage("Msg");
  41. $this->expectExceptionCode(123);
  42. }
  43. public function test_php_unit_expectation_56() {
  44. $this->setExpectedExceptionRegExp("RuntimeException", "/Msg.*/", 123);
  45. }
  46. }