-
-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
#1212 - Add test case
- Loading branch information
Showing
2 changed files
with
40 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
namespace Stub; | ||
|
||
class Spl | ||
{ | ||
/** | ||
* @issue https://github.com/zephir-lang/zephir/issues/1212 | ||
*/ | ||
public static function issue1212(string file) | ||
{ | ||
return new \SplFileObject(file); | ||
} | ||
} |
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,28 @@ | ||
<?php | ||
|
||
/** | ||
* This file is part of the Zephir. | ||
* | ||
* (c) Phalcon Team <[email protected]> | ||
* | ||
* For the full copyright and license information, please view | ||
* the LICENSE file that was distributed with this source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Extension; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use Stub\Spl; | ||
|
||
final class SplTest extends TestCase | ||
{ | ||
/** | ||
* @issue https://github.com/zephir-lang/zephir/issues/1212 | ||
*/ | ||
public function testIssue1212(): void | ||
{ | ||
$this->assertInstanceOf(\SplFileObject::class, Spl::issue1212(__DIR__ . '/../fixtures/class-empty.php')); | ||
} | ||
} |