CakeRequestに検出器を追加するためのフィルター
(例)$request->is('admin')
$request->is('smartphone')
$request->is(array('smartphone', 'mobile')) // OR
$request->isAll(array('smartphone', 'page_display')) // AND
/** * 固定ページ表示用のURLかどうかを判定 * [注]ルーターによるURLパース後のみ * * @param bool $expect 期待値 * @param string $url URL文字列 * @return void * @dataProvider isPageDataProvider */ public function testIsPage($expect, $url) { $request = $this->_getRequest($url); $this->assertEquals($expect, $this->requestFilter->isPage($request)); }