-
-
Notifications
You must be signed in to change notification settings - Fork 468
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #423 from dreamsxin/issues_404
Fix #404 Updated IdenticalOperator.php and operators.h
- Loading branch information
Showing
4 changed files
with
60 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace Test; | ||
|
||
class Operator | ||
{ | ||
public function testIdentical(param1, param2) | ||
{ | ||
return param1 === param2; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
/* | ||
+--------------------------------------------------------------------------+ | ||
| Zephir Language | | ||
+--------------------------------------------------------------------------+ | ||
| Copyright (c) 2013-2014 Zephir Team and contributors | | ||
+--------------------------------------------------------------------------+ | ||
| This source file is subject the MIT license, that is bundled with | | ||
| this package in the file LICENSE, and is available through the | | ||
| world-wide-web at the following url: | | ||
| http://zephir-lang.com/license.html | | ||
| | | ||
| If you did not receive a copy of the MIT license and are unable | | ||
| to obtain it through the world-wide-web, please send a note to | | ||
| [email protected] so we can mail you a copy immediately. | | ||
+--------------------------------------------------------------------------+ | ||
*/ | ||
|
||
namespace Extension; | ||
|
||
class OperatorTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
public function test404Issue() | ||
{ | ||
$t = new \Test\Operator(); | ||
|
||
$this->assertFalse($t->testIdentical(true, 1)); | ||
$this->assertFalse($t->testIdentical(true, 'phalcon')); | ||
$this->assertFalse($t->testIdentical(false, 0)); | ||
$this->assertFalse($t->testIdentical(1, '1')); | ||
$this->assertTrue($t->testIdentical(1, 1)); | ||
$this->assertTrue($t->testIdentical(true, true)); | ||
$this->assertTrue($t->testIdentical('phalcon', 'phalcon')); | ||
} | ||
} |