mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-09 21:43:22 +09:00
34 lines
687 B
PHP
34 lines
687 B
PHP
<?php
|
|
|
|
|
|
namespace Box\Mod\Example\Api;
|
|
|
|
|
|
class GuestTest extends \BBTestCase {
|
|
|
|
/**
|
|
* @var \Box\Mod\Example\Api\Guest
|
|
*/
|
|
protected $api = null;
|
|
|
|
public function setup(): void
|
|
{
|
|
$this->api= new \Box\Mod\Example\Api\Guest();
|
|
}
|
|
|
|
public function testreadme()
|
|
{
|
|
$toolsMock = $this->getMockBuilder('\Box_Tools')->getMock();
|
|
$toolsMock->expects($this->atLeastOnce())
|
|
->method('file_get_contents')
|
|
->willReturn('');
|
|
|
|
|
|
$di = new \Box_Di();
|
|
$di['tools'] = $toolsMock;
|
|
$this->api->setDi($di);
|
|
|
|
$result = $this->api->readme(array());
|
|
$this->assertIsString($result);
|
|
}
|
|
} |