Skip to content

Commit 7be8483

Browse files
Merge branch '2.7' into 2.8
* 2.7: Refactoring tests.
2 parents e4e64cb + 1902adb commit 7be8483

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Tests/LegacyOptionsResolverTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public function testResolveLazyDependencyOnMissingOptionalWithoutDefault()
124124
$this->resolver->setDefaults(array(
125125
'two' => function (Options $options) use ($test) {
126126
/* @var TestCase $test */
127-
$test->assertFalse(isset($options['one']));
127+
$test->assertArrayNotHasKey('one', $options);
128128

129129
return '2';
130130
},
@@ -148,7 +148,7 @@ public function testResolveLazyDependencyOnOptionalWithoutDefault()
148148
$this->resolver->setDefaults(array(
149149
'two' => function (Options $options) use ($test) {
150150
/* @var TestCase $test */
151-
$test->assertTrue(isset($options['one']));
151+
$test->assertArrayHasKey('one', $options);
152152

153153
return $options['one'].'2';
154154
},

Tests/OptionsResolver2Dot6Test.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,12 +1419,12 @@ public function testArrayAccess()
14191419
});
14201420

14211421
$this->resolver->setDefault('lazy2', function (Options $options) {
1422-
Assert::assertTrue(isset($options['default1']));
1423-
Assert::assertTrue(isset($options['default2']));
1424-
Assert::assertTrue(isset($options['required']));
1425-
Assert::assertTrue(isset($options['lazy1']));
1426-
Assert::assertTrue(isset($options['lazy2']));
1427-
Assert::assertFalse(isset($options['defined']));
1422+
Assert::assertArrayHasKey('default1', $options);
1423+
Assert::assertArrayHasKey('default2', $options);
1424+
Assert::assertArrayHasKey('required', $options);
1425+
Assert::assertArrayHasKey('lazy1', $options);
1426+
Assert::assertArrayHasKey('lazy2', $options);
1427+
Assert::assertArrayNotHasKey('defined', $options);
14281428

14291429
Assert::assertSame(0, $options['default1']);
14301430
Assert::assertSame(42, $options['default2']);

0 commit comments

Comments
 (0)