Checks that variable is not empty.
public assertNotEmpty ( $actual, string $message = null ) | ||
$actual | ||
$message | string |
public function testRequestConstruct() { $this->tester->assertNotEmpty($this->request->getGet()); $this->tester->assertNotEmpty($this->request->getPost()); $this->tester->assertNotEmpty($this->request->getCookie()); $this->tester->assertNotEmpty($this->request->getServer()); }
public function testGetAuthUrlWithExtraPermissions() { $permissions = ['hola', 'adios']; $url = $this->facebook->getAuthUrl(null, $permissions); $this->tester->assertNotEmpty($url); $this->tester->assertContains('&scope=', $url); $this->tester->assertContains(implode(',', $this->facebook->default_permissions), $url); $this->tester->assertContains(implode(',', $permissions), $url); }
public function testRun() { $result = 'Hello world'; $route = new router\Container(['test/route/{name:\\d}' => function ($request) use($result) { $this->tester->assertNotEmpty($request); $this->tester->assertTrue($request instanceof router\Request); return $result; }]); $out = $route->route('test/route/1'); $this->tester->assertEquals($out, $result); }