/** * Test is('requested') and isRequested() * * @return void */ public function testIsRequested() { $request = new CakeRequest('/posts/index'); $request->addParams(array('controller' => 'posts', 'action' => 'index', 'plugin' => null, 'requested' => 1)); $this->assertTrue($request->is('requested')); $this->assertTrue($request->isRequested()); $request = new CakeRequest('/posts/index'); $request->addParams(array('controller' => 'posts', 'action' => 'index', 'plugin' => null)); $this->assertFalse($request->is('requested')); $this->assertFalse($request->isRequested()); }