1111
1212namespace EnricoStahn \JsonAssert \Tests ;
1313
14- class AssertTraitTest extends \PHPUnit_Framework_TestCase
14+ use PHPUnit \Framework \ExpectationFailedException ;
15+ use PHPUnit \Framework \TestCase ;
16+
17+ class AssertTraitTest extends TestCase
1518{
1619 /**
1720 * Showcase for the Wiki.
@@ -33,7 +36,7 @@ public function testAssertJsonMatchesSchema()
3336 }
3437
3538 /**
36- * @expectedException \PHPUnit_Framework_ExpectationFailedException
39+ * @expectedException \PHPUnit\Framework\ExpectationFailedException
3740 */
3841 public function testAssertJsonMatchesSchemaFail ()
3942 {
@@ -50,12 +53,12 @@ public function testAssertJsonMatchesSchemaFailMessage()
5053
5154 try {
5255 AssertTraitImpl::assertJsonMatchesSchema (Utils::getSchemaPath ('test.schema.json ' ), $ content );
53- } catch (\ PHPUnit_Framework_ExpectationFailedException $ exception ) {
56+ } catch (ExpectationFailedException $ exception ) {
5457 self ::assertContains ('- Property: foo, Contraint: type, Message: String value found, but an integer is required ' , $ exception ->getMessage ());
5558 self ::assertContains ('- Response: {"foo":"123"} ' , $ exception ->getMessage ());
5659 }
5760
58- self ::assertInstanceOf ('PHPUnit_Framework_ExpectationFailedException ' , $ exception );
61+ self ::assertInstanceOf ('\PHPUnit\Framework\ExpectationFailedException ' , $ exception );
5962 }
6063
6164 /**
@@ -69,7 +72,7 @@ public function testAssertJsonMatchesSchemaWithRefs()
6972 }
7073
7174 /**
72- * @expectedException \PHPUnit_Framework_ExpectationFailedException
75+ * @expectedException \PHPUnit\Framework\ExpectationFailedException
7376 */
7477 public function testAssertJsonMatchesSchemaWithRefsFails ()
7578 {
@@ -110,7 +113,7 @@ public function assertJsonValueEqualsProvider()
110113 }
111114
112115 /**
113- * @expectedException \PHPUnit_Framework_ExpectationFailedException
116+ * @expectedException \PHPUnit\Framework\ExpectationFailedException
114117 */
115118 public function testAssertJsonValueEqualsFailsOnWrongDataType ()
116119 {
@@ -120,14 +123,14 @@ public function testAssertJsonValueEqualsFailsOnWrongDataType()
120123 }
121124
122125 /**
123- * @dataProvider testGetJsonObjectProvider
126+ * @dataProvider jsonObjectProvider
124127 */
125128 public function testGetJsonObject ($ expected , $ actual )
126129 {
127130 self ::assertEquals ($ expected , AssertTraitImpl::getJsonObject ($ actual ));
128131 }
129132
130- public function testGetJsonObjectProvider ()
133+ public function jsonObjectProvider ()
131134 {
132135 return [
133136 [[], []],
0 commit comments