Skip to content

Commit

Permalink
Added php tests
Browse files Browse the repository at this point in the history
  • Loading branch information
matyhtf committed Aug 21, 2024
1 parent bc40d4d commit cfd5734
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/lib/app/phpy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import phpy


def test_import():
return phpy.call('get_loaded_extensions', False)
6 changes: 6 additions & 0 deletions tests/phpunit/ZendTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,10 @@ function testCallMethodInPython()
$rs = $m->test_redis($redis);
$this->assertEquals($rs, 'hello phpy');
}

function testCallFuncInPython()
{
$m = PyCore::import('app.phpy');
$this->assertContains('phpy', $m->test_import());
}
}

0 comments on commit cfd5734

Please sign in to comment.