Skip to content

Commit 9ee9ded

Browse files
committed
Merge branch '3.4' into 4.0
* 3.4: fixed wrong merge Tweak message to be Flex friendly [Routing] fixed tests Fixing wrong class_exists on interface Preserve percent-encoding in URLs when performing redirects in the UrlMatcher [Console] Fix a bug when passing a letter that could be an alias add missing validation options to XSD file Take advantage of AnnotationRegistry::registerUniqueLoader [DI] Optimize Container::get() for perf fix merge Fix tests Refactoring tests.
2 parents 6bf2702 + 8c4e3da commit 9ee9ded

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

Tests/Data/Bundle/Reader/IntlBundleReaderTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function testReadReturnsArrayAccess()
3636

3737
$this->assertInstanceOf('\ArrayAccess', $data);
3838
$this->assertSame('Bar', $data['Foo']);
39-
$this->assertFalse(isset($data['ExistsNot']));
39+
$this->assertArrayNotHasKey('ExistsNot', $data);
4040
}
4141

4242
public function testReadFollowsAlias()
@@ -46,7 +46,7 @@ public function testReadFollowsAlias()
4646

4747
$this->assertInstanceOf('\ArrayAccess', $data);
4848
$this->assertSame('Bar', $data['Foo']);
49-
$this->assertFalse(isset($data['ExistsNot']));
49+
$this->assertArrayNotHasKey('ExistsNot', $data);
5050
}
5151

5252
public function testReadDoesNotFollowFallback()
@@ -56,9 +56,9 @@ public function testReadDoesNotFollowFallback()
5656

5757
$this->assertInstanceOf('\ArrayAccess', $data);
5858
$this->assertSame('Bam', $data['Baz']);
59-
$this->assertFalse(isset($data['Foo']));
59+
$this->assertArrayNotHasKey('Foo', $data);
6060
$this->assertNull($data['Foo']);
61-
$this->assertFalse(isset($data['ExistsNot']));
61+
$this->assertArrayNotHasKey('ExistsNot', $data);
6262
}
6363

6464
public function testReadDoesNotFollowFallbackAlias()
@@ -68,9 +68,9 @@ public function testReadDoesNotFollowFallbackAlias()
6868

6969
$this->assertInstanceOf('\ArrayAccess', $data);
7070
$this->assertSame('Bam', $data['Baz'], 'data from the aliased locale can be accessed');
71-
$this->assertFalse(isset($data['Foo']));
71+
$this->assertArrayNotHasKey('Foo', $data);
7272
$this->assertNull($data['Foo']);
73-
$this->assertFalse(isset($data['ExistsNot']));
73+
$this->assertArrayNotHasKey('ExistsNot', $data);
7474
}
7575

7676
/**

Tests/Data/Bundle/Reader/JsonBundleReaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function testReadReturnsArray()
3535

3636
$this->assertInternalType('array', $data);
3737
$this->assertSame('Bar', $data['Foo']);
38-
$this->assertFalse(isset($data['ExistsNot']));
38+
$this->assertArrayNotHasKey('ExistsNot', $data);
3939
}
4040

4141
/**

Tests/Data/Bundle/Reader/PhpBundleReaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function testReadReturnsArray()
3535

3636
$this->assertInternalType('array', $data);
3737
$this->assertSame('Bar', $data['Foo']);
38-
$this->assertFalse(isset($data['ExistsNot']));
38+
$this->assertArrayNotHasKey('ExistsNot', $data);
3939
}
4040

4141
/**

Tests/Data/Util/RingBufferTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ public function testWriteWithinBuffer()
3434
$this->buffer[0] = 'foo';
3535
$this->buffer['bar'] = 'baz';
3636

37-
$this->assertTrue(isset($this->buffer[0]));
38-
$this->assertTrue(isset($this->buffer['bar']));
37+
$this->assertArrayHasKey(0, $this->buffer);
38+
$this->assertArrayHasKey('bar', $this->buffer);
3939
$this->assertSame('foo', $this->buffer[0]);
4040
$this->assertSame('baz', $this->buffer['bar']);
4141
}
@@ -46,8 +46,8 @@ public function testWritePastBuffer()
4646
$this->buffer['bar'] = 'baz';
4747
$this->buffer[2] = 'bam';
4848

49-
$this->assertTrue(isset($this->buffer['bar']));
50-
$this->assertTrue(isset($this->buffer[2]));
49+
$this->assertArrayHasKey('bar', $this->buffer);
50+
$this->assertArrayHasKey(2, $this->buffer);
5151
$this->assertSame('baz', $this->buffer['bar']);
5252
$this->assertSame('bam', $this->buffer[2]);
5353
}
@@ -62,14 +62,14 @@ public function testReadNonExistingFails()
6262

6363
public function testQueryNonExisting()
6464
{
65-
$this->assertFalse(isset($this->buffer['foo']));
65+
$this->assertArrayNotHasKey('foo', $this->buffer);
6666
}
6767

6868
public function testUnsetNonExistingSucceeds()
6969
{
7070
unset($this->buffer['foo']);
7171

72-
$this->assertFalse(isset($this->buffer['foo']));
72+
$this->assertArrayNotHasKey('foo', $this->buffer);
7373
}
7474

7575
/**
@@ -86,7 +86,7 @@ public function testReadOverwrittenFails()
8686

8787
public function testQueryOverwritten()
8888
{
89-
$this->assertFalse(isset($this->buffer[0]));
89+
$this->assertArrayNotHasKey(0, $this->buffer);
9090
}
9191

9292
public function testUnsetOverwrittenSucceeds()
@@ -97,6 +97,6 @@ public function testUnsetOverwrittenSucceeds()
9797

9898
unset($this->buffer[0]);
9999

100-
$this->assertFalse(isset($this->buffer[0]));
100+
$this->assertArrayNotHasKey(0, $this->buffer);
101101
}
102102
}

0 commit comments

Comments
 (0)