public function testGetWatched() { $fixture = $this->_fixture[0]; $profile = new Xhgui_Profile($fixture); $data = $profile->getProfile(); $this->assertEmpty($profile->getWatched('not there')); $matches = $profile->getWatched('strpos.*'); $this->assertCount(1, $matches); $this->assertEquals('strpos()', $matches[0]['function']); $this->assertEquals($data['strpos()']['wt'], $matches[0]['wt']); $matches = $profile->getWatched('str.*'); $this->assertCount(1, $matches); $this->assertEquals('strpos()', $matches[0]['function']); $this->assertEquals($data['strpos()']['wt'], $matches[0]['wt']); $matches = $profile->getWatched('[ms].*'); $this->assertCount(2, $matches); $this->assertEquals('strpos()', $matches[0]['function']); $this->assertEquals($data['strpos()']['wt'], $matches[0]['wt']); $this->assertEquals('main()', $matches[1]['function']); $this->assertEquals($data['main()']['wt'], $matches[1]['wt']); }