Skip to content

Commit

Permalink
Fixed falling tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrooo committed Jul 13, 2018
1 parent ee0385b commit 3b95fc9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/src/Ouzo/Goodies/Utilities/ArraysTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -864,17 +864,19 @@ public function shouldNotRemoveNestedKeyWhenKeyNotFoundAndValueIsNull()

/**
* @test
* @expectedException \PHPUnit_Framework_Error_Deprecated
* @expectedExceptionMessage Use Arrays::removeNestedKey instead
*/
public function shouldThrowDeprecatedExceptionWhenUseRemoveNestedValue()
{
//given
$array = ['1' => ['2' => ['3' => 'value']]];

//when
/** @noinspection PhpDeprecationInspection */
Arrays::removeNestedValue($array, ['1', '2']);
try {
/** @noinspection PhpDeprecationInspection */
Arrays::removeNestedValue($array, ['1', '2']);
} catch (Exception $e) {//then
$this->assertEquals('Use Arrays::removeNestedKey instead', $e->getMessage());
}
}

/**
Expand Down

0 comments on commit 3b95fc9

Please sign in to comment.