Skip to content

Commit

Permalink
Update tests for #1494
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyklay committed Nov 2, 2019
1 parent abb5227 commit fe4bce3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
14 changes: 4 additions & 10 deletions test/spropertyaccess.zep
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ class SPropertyAccess
return delimiter;
}

/**
* @see https://github.com/phalcon/zephir/issues/1494
*/
public static function mutateStringVarInsideCycle() -> string
{
var i;
Expand All @@ -64,8 +61,8 @@ class SPropertyAccess
var i;

for _ in range(0, 3) {
let i = 2;
let self::intVar = self::intVar + i;
let i = 42;
let self::intVar = i;
}

return self::intVar;
Expand All @@ -79,16 +76,13 @@ class SPropertyAccess
var i;

for _ in range(0, 3) {
let i = 2.1;
let self::doubleVar = self::doubleVar + i;
let i = 3.14;
let self::doubleVar = i;
}

return self::doubleVar;
}

/**
* @see https://github.com/phalcon/zephir/issues/1494
*/
public static function mutateArrayVarInsideCycle() -> array
{
var i, j;
Expand Down
8 changes: 2 additions & 6 deletions unit-tests/Extension/SPropertyAccessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ public function testStaticPropertyAccessWithUnderscore()

/**
* @test
*
* @see https://github.com/phalcon/zephir/issues/1494
*/
public function shouldMutateStringVarInsideCycle()
{
Expand All @@ -51,7 +49,7 @@ public function shouldMutateStringVarInsideCycle()
public function shouldMutateIntVarInsideCycle()
{
$this->assertEquals(
8,
42,
SPropertyAccess::mutateIntVarInsideCycle()
);
}
Expand All @@ -64,15 +62,13 @@ public function shouldMutateIntVarInsideCycle()
public function shouldMutateDoubleVarInsideCycle()
{
$this->assertEquals(
8.4,
3.14,
SPropertyAccess::mutateDoubleVarInsideCycle()
);
}

/**
* @test
*
* @see https://github.com/phalcon/zephir/issues/1494
*/
public function shouldMutateArrayVarInsideCycle()
{
Expand Down

0 comments on commit fe4bce3

Please sign in to comment.