Skip to content
Permalink
Browse files

Fix ArrayAccess test

  • Loading branch information
muglug committed Nov 11, 2019
1 parent 96586f1 commit 589ab5400a01477b956c1f8477e8be8d71e7a271
Showing with 4 additions and 4 deletions.
  1. +4 −4 tests/ArrayAccessTest.php
@@ -14,7 +14,7 @@ class ArrayAccessTest extends TestCase
public function testEnsureArrayOffsetsExist()
{
$this->expectException(\Psalm\Exception\CodeException::class);
$this->expectExceptionMessage('PossiblyUndefinedArrayOffset');
$this->expectExceptionMessage('PossiblyUndefinedStringArrayOffset');
\Psalm\Config::getInstance()->ensure_array_string_offsets_exist = true;
@@ -101,7 +101,7 @@ function foo(array $s) : void {
public function testComplainAfterFirstIsset()
{
$this->expectException(\Psalm\Exception\CodeException::class);
$this->expectExceptionMessage('PossiblyUndefinedArrayOffset');
$this->expectExceptionMessage('PossiblyUndefinedStringArrayOffset');
\Psalm\Config::getInstance()->ensure_array_string_offsets_exist = true;
@@ -122,7 +122,7 @@ function foo(array $arr) : void {
public function testEnsureArrayIntOffsetsExist()
{
$this->expectException(\Psalm\Exception\CodeException::class);
$this->expectExceptionMessage('PossiblyUndefinedArrayOffset');
$this->expectExceptionMessage('PossiblyUndefinedIntArrayOffset');
\Psalm\Config::getInstance()->ensure_array_int_offsets_exist = true;
@@ -211,7 +211,7 @@ public function testEnsureListOffsetExistsAfterArrayPop()
\Psalm\Config::getInstance()->ensure_array_int_offsets_exist = true;
$this->expectException(\Psalm\Exception\CodeException::class);
$this->expectExceptionMessage('PossiblyUndefinedArrayOffset');
$this->expectExceptionMessage('PossiblyUndefinedIntArrayOffset');
$this->addFile(
'somefile.php',

0 comments on commit 589ab54

Please sign in to comment.
You can’t perform that action at this time.