Skip to content

Commit

Permalink
Amended tests for #2057 (part III)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyklay committed Apr 23, 2020
1 parent 4a0ecb6 commit 8da899b
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions unit-tests/Extension/Oo/Scopes/PrivateScopeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ public function shouldSetPrivatePropertyNewInternal()
*/
public function shouldNotSetPrivatePropertyViaThis()
{
$this->markTestSkipped('This test is not ready');
$this->expectException(Error::class);
$this->expectExceptionMessage(
'Cannot access private property TestScopeExtending::$privateProperty'
Expand Down Expand Up @@ -187,8 +186,10 @@ public function shouldSetPrivatePropertyViaThis()
*/
public function shouldNotSetPrivatePropertyExtendedMagicObjInternal()
{
$this->markTestSkipped('This test is not ready');
$this->expectException(Error::class);
$this->expectExceptionMessage(
'Cannot access private property TestScopeExtendingMagic::$privateProperty2'
);

$object = new TestScopeExtendingMagic();
$tester = new PrivateScopeTester();
Expand All @@ -203,8 +204,10 @@ public function shouldNotSetPrivatePropertyExtendedMagicObjInternal()
*/
public function shouldNotSetPrivatePropertyExtendedMagicNewInternal()
{
$this->markTestSkipped('This test is not ready');
$this->expectException(Error::class);
$this->expectExceptionMessage(
'Cannot access private property TestScopeExtendingMagic::$privateProperty2'
);

$tester = new PrivateScopeTester();
$tester->setPropertyNew(TestScopeExtendingMagic::class, 'privateProperty2', 'test');
Expand All @@ -217,8 +220,10 @@ public function shouldNotSetPrivatePropertyExtendedMagicNewInternal()
*/
public function shouldNotSetPrivatePropertyExtendedMagicObjPhp()
{
$this->markTestSkipped('This test is not ready');
$this->expectException(Error::class);
$this->expectExceptionMessage(
'Cannot access private property TestScopePhpMagicExtending::$privateProperty2'
);

$obj = new TestScopePhpMagicExtending();

Expand All @@ -233,8 +238,10 @@ public function shouldNotSetPrivatePropertyExtendedMagicObjPhp()
*/
public function shouldNotSetPrivatePropertyExtendedMagicNewPhp()
{
$this->markTestSkipped('This test is not ready');
$this->expectException(Error::class);
$this->expectExceptionMessage(
'Cannot access private property TestScopePhpMagicExtending::$privateProperty2'
);

$tester = new PrivateScopeTester();
$tester->setPropertyNew(TestScopePhpMagicExtending::class, 'privateProperty2', 'test');
Expand Down

0 comments on commit 8da899b

Please sign in to comment.