コード例 #1
0
 public function testShouldNotify()
 {
     $generator = new Generator();
     $generator->setOutputDir($this->outputDir);
     $generator->setHostname('http://www.example.com');
     $generator->setCompress(true);
     $generator->addUrl(new Url('/'));
     $generator->addUrl(new Url('/path1'));
     $generator->addUrl(new Url('/path2', '2014-01-01'));
     $notifier = $this->getMock('\\Sitemapper\\EngineNotifier', array('notify'));
     $notifier->expects($this->once())->method('notify')->with($generator->getLocation());
     $generator->addNotifier($notifier);
     $generator->generate();
 }