File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -65,17 +65,19 @@ public function invalidValueProvider() {
6565
6666 /**
6767 * __toString()
68+ * @dataProvider toStringProvider
6869 */
69- public function testToString ()
70+ public function testToString ($ expected , $ enumObject )
7071 {
71- $ value = new EnumFixture (EnumFixture::FOO );
72- $ this ->assertEquals (EnumFixture::FOO , (string ) $ value );
73-
74- $ value = new EnumFixture (EnumFixture::BAR );
75- $ this ->assertEquals (EnumFixture::BAR , (string ) $ value );
72+ $ this ->assertSame ($ expected , (string ) $ enumObject );
73+ }
7674
77- $ value = new EnumFixture (EnumFixture::NUMBER );
78- $ this ->assertEquals ((string ) EnumFixture::NUMBER , (string ) $ value );
75+ public function toStringProvider () {
76+ return [
77+ [EnumFixture::FOO , new EnumFixture (EnumFixture::FOO )],
78+ [EnumFixture::BAR , new EnumFixture (EnumFixture::BAR )],
79+ [(string ) EnumFixture::NUMBER , new EnumFixture (EnumFixture::NUMBER )],
80+ ];
7981 }
8082
8183 /**
You can’t perform that action at this time.
0 commit comments