mirror of
https://github.com/php-win-ext/phpy.git
synced 2026-04-26 18:08:15 +02:00
23 lines
475 B
PHP
23 lines
475 B
PHP
<?php
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class IterTest extends TestCase
|
|
{
|
|
function testIter()
|
|
{
|
|
$os = PyCore::import('os');
|
|
$uname = $os->uname();
|
|
|
|
$iter = PyCore::iter($uname);
|
|
$this->assertTrue($iter instanceof PyIter);
|
|
|
|
$list = [];
|
|
while ($next = PyCore::next($iter)) {
|
|
$list[] = PyCore::scalar($next);
|
|
}
|
|
$this->assertIsArray($list);
|
|
$this->assertEquals(count($list), 5);
|
|
}
|
|
}
|