summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-10-22 01:35:59 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-10-22 01:35:59 +0200
commit78d3e2164116f299effb11d25b1971e6d375366e (patch)
treed7a875f96833946b82f001ebdba1c23b19d32b17 /tests
parentfb28fadcf6e71b4b797aa4241436ec3add543ba0 (diff)
get rid of simplepie
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/articleenhancer/XPathArticleEnhancerTest.php189
-rw-r--r--tests/unit/config/ConfigTest.php26
-rw-r--r--tests/unit/controller/AdminControllerTest.php18
-rw-r--r--tests/unit/fetcher/FeedFetcherTest.php165
-rw-r--r--tests/unit/utility/SimplePieAPIFactoryTest.php34
5 files changed, 106 insertions, 326 deletions
diff --git a/tests/unit/articleenhancer/XPathArticleEnhancerTest.php b/tests/unit/articleenhancer/XPathArticleEnhancerTest.php
index 00c4e7cb0..33f0e75ab 100644
--- a/tests/unit/articleenhancer/XPathArticleEnhancerTest.php
+++ b/tests/unit/articleenhancer/XPathArticleEnhancerTest.php
@@ -19,78 +19,49 @@ use \OCA\News\Db\Item;
class XPathArticleEnhancerTest extends \PHPUnit_Framework_TestCase {
private $testEnhancer;
- private $fileFactory;
- private $timeout;
- private $redirects;
- private $headers;
- private $userAgent;
- private $proxyHost;
- private $proxyPort;
- private $proxyAuth;
+ private $client;
+ private $clientFactory;
protected function setUp() {
$this->timeout = 30;
- $this->fileFactory = $this
- ->getMockBuilder('\OCA\News\Utility\SimplePieAPIFactory')
+ $this->clientFactory = $this
+ ->getMockBuilder('\OCA\News\Utility\PicoFeedClientFactory')
->disableOriginalConstructor()
->getMock();
- $this->proxyHost = 'test';
- $this->proxyPort = 3;
- $this->proxyAuth = 'hi';
- $this->config = $this->getMockBuilder(
- '\OCA\News\Config\Config')
+ $this->client = $this
+ ->getMockBuilder('\PicoFeed\Client')
->disableOriginalConstructor()
->getMock();
- $this->config->expects($this->any())
- ->method('getProxyHost')
- ->will($this->returnValue(''));
- $this->config->expects($this->any())
- ->method('getProxyAuth')
- ->will($this->returnValue($this->proxyAuth));
- $this->config->expects($this->any())
- ->method('getProxyPort')
- ->will($this->returnValue($this->proxyPort));
- $this->config->expects($this->any())
- ->method('getFeedFetcherTimeout')
- ->will($this->returnValue($this->timeout));
$this->testEnhancer = new XPathArticleEnhancer(
- $this->fileFactory,
+ $this->clientFactory,
[
'/explosm.net\/comics/' =>
'//*[@id=\'maincontent\']/div[2]/div/span',
'/explosm.net\/shorts/' => '//*[@id=\'maincontent\']/div/div',
'/explosm.net\/all/' => '//body/*',
'/themerepublic.net/' => '//*[@class=\'post hentry\']'
- ],
- $this->config
+ ]
);
- $this->redirects = 5;
- $this->headers = null;
$this->userAgent = 'Mozilla/5.0 AppleWebKit';
}
-
- public function testXPathUsesNoProxy() {
- $file = new \stdClass;
- $file->headers = ["content-type"=>"text/html; charset=utf-8"];
- $file->body = '';
- $item = new Item();
- $item->setUrl('https://www.explosm.net/comics/312');
- $item->setBody('Hello thar');
-
- $this->fileFactory->expects($this->once())
- ->method('getFile')
- ->with($this->equalTo($item->getUrl()),
- $this->equalTo($this->timeout),
- $this->equalTo($this->redirects),
- $this->equalTo($this->headers),
- $this->equalTo($this->userAgent),
- $this->equalTo(false))
- ->will($this->returnValue($file));
-
- $result = $this->testEnhancer->enhance($item);
- $this->assertEquals('Hello thar', $result->getBody());
+ private function setUpFile($body, $encoding, $url) {
+ $this->clientFactory->expects($this->once())
+ ->method('build')
+ ->will($this->returnValue($this->client));
+ $this->client->expects($this->once())
+ ->method('execute')
+ ->with($this->equalTo($url));
+ $this->client->expects($this->once())
+ ->method('setUserAgent')
+ ->with($this->equalTo($this->userAgent));
+ $this->client->expects($this->once())
+ ->method('getContent')
+ ->will($this->returnValue($body));
+ $this->client->expects($this->once())
+ ->method('getEncoding')
+ ->will($this->returnValue($encoding));
}
@@ -102,9 +73,8 @@ class XPathArticleEnhancerTest extends \PHPUnit_Framework_TestCase {
public function testDoesModifiyArticlesThatMatch() {
- $file = new \stdClass;
- $file->headers = ["content-type"=>"text/html; charset=utf-8"];
- $file->body = '<html>
+ $encoding = 'utf-8';
+ $body = '<html>
<body>
<div id="maincontent">
<div>nooo</div>
@@ -116,14 +86,7 @@ class XPathArticleEnhancerTest extends \PHPUnit_Framework_TestCase {
$item->setUrl('https://www.explosm.net/comics/312');
$item->setBody('Hello thar');
- $this->fileFactory->expects($this->once())
- ->method('getFile')
- ->with($this->equalTo($item->getUrl()),
- $this->equalTo($this->timeout),
- $this->equalTo($this->redirects),
- $this->equalTo($this->headers),
- $this->equalTo($this->userAgent))
- ->will($this->returnValue($file));
+ $this->setUpFile($body, $encoding, $item->getUrl());
$result = $this->testEnhancer->enhance($item);
$this->assertEquals('<div><span>hiho</span></div>', $result->getBody());
@@ -131,9 +94,8 @@ class XPathArticleEnhancerTest extends \PHPUnit_Framework_TestCase {
public function testDoesModifiyAllArticlesThatMatch() {
- $file = new \stdClass;
- $file->headers = ["content-type"=>"text/html; charset=utf-8"];
- $file->body = '<html>
+ $encoding = 'utf-8';
+ $body = '<html>
<body>
<div id="maincontent">
<div>nooo<div>hiho</div></div>
@@ -145,14 +107,7 @@ class XPathArticleEnhancerTest extends \PHPUnit_Framework_TestCase {
$item->setUrl('https://www.explosm.net/shorts/312');
$item->setBody('Hello thar');
- $this->fileFactory->expects($this->once())
- ->method('getFile')
- ->with($this->equalTo($item->getUrl()),
- $this->equalTo($this->timeout),
- $this->equalTo($this->redirects),
- $this->equalTo($this->headers),
- $this->equalTo($this->userAgent))
- ->will($this->returnValue($file));
+ $this->setUpFile($body, $encoding, $item->getUrl());
$result = $this->testEnhancer->enhance($item);
$this->assertEquals('<div><div>hiho</div><div>rawr</div></div>',
@@ -161,9 +116,8 @@ class XPathArticleEnhancerTest extends \PHPUnit_Framework_TestCase {
public function testModificationHandlesEmptyResults() {
- $file = new \stdClass;
- $file->headers = ["content-type"=>"text/html; charset=utf-8"];
- $file->body = '<html>
+ $encoding = 'utf-8';
+ $body = '<html>
<body>
<div id="maincontent">
</div>
@@ -173,14 +127,7 @@ class XPathArticleEnhancerTest extends \PHPUnit_Framework_TestCase {
$item->setUrl('https://www.explosm.net/comics/312');
$item->setBody('Hello thar');
- $this->fileFactory->expects($this->once())
- ->method('getFile')
- ->with($this->equalTo($item->getUrl()),
- $this->equalTo($this->timeout),
- $this->equalTo($this->redirects),
- $this->equalTo($this->headers),
- $this->equalTo($this->userAgent))
- ->will($this->returnValue($file));
+ $this->setUpFile($body, $encoding, $item->getUrl());
$result = $this->testEnhancer->enhance($item);
$this->assertEquals('Hello thar', $result->getBody());
@@ -188,21 +135,13 @@ class XPathArticleEnhancerTest extends \PHPUnit_Framework_TestCase {
public function testModificationDoesNotBreakOnEmptyDom() {
- $file = new \stdClass;
- $file->headers = ["content-type"=>"text/html; charset=utf-8"];
- $file->body = '';
+ $encoding = 'utf-8';
+ $body = '';
$item = new Item();
$item->setUrl('https://www.explosm.net/comics/312');
$item->setBody('Hello thar');
- $this->fileFactory->expects($this->once())
- ->method('getFile')
- ->with($this->equalTo($item->getUrl()),
- $this->equalTo($this->timeout),
- $this->equalTo($this->redirects),
- $this->equalTo($this->headers),
- $this->equalTo($this->userAgent))
- ->will($this->returnValue($file));
+ $this->setUpFile($body, $encoding, $item->getUrl());
$result = $this->testEnhancer->enhance($item);
$this->assertEquals('Hello thar', $result->getBody());
@@ -210,9 +149,8 @@ class XPathArticleEnhancerTest extends \PHPUnit_Framework_TestCase {
public function testModificationDoesNotBreakOnBrokenDom() {
- $file = new \stdClass;
- $file->headers = ["content-type"=>"text/html; charset=utf-8"];
- $file->body = '<html/><p>
+ $encoding = 'utf-8';
+ $body = '<html/><p>
<body>
<div id="maincontent">
</div>
@@ -222,14 +160,7 @@ class XPathArticleEnhancerTest extends \PHPUnit_Framework_TestCase {
$item->setUrl('https://www.explosm.net/comics/312');
$item->setBody('Hello thar');
- $this->fileFactory->expects($this->once())
- ->method('getFile')
- ->with($this->equalTo($item->getUrl()),
- $this->equalTo($this->timeout),
- $this->equalTo($this->redirects),
- $this->equalTo($this->headers),
- $this->equalTo($this->userAgent))
- ->will($this->returnValue($file));
+ $this->setUpFile($body, $encoding, $item->getUrl());
$result = $this->testEnhancer->enhance($item);
$this->assertEquals('Hello thar', $result->getBody());
@@ -237,9 +168,8 @@ class XPathArticleEnhancerTest extends \PHPUnit_Framework_TestCase {
public function testTransformRelativeUrls() {
- $file = new \stdClass;
- $file->headers = ["content-type"=>"text/html; charset=utf-8"];
- $file->body = '<html>
+ $encoding = 'utf-8';
+ $body = '<html>
<body>
<a href="../a/relative/url.html?a=1#b">link</a>
<a href="b/relative/url.html">link2</a>
@@ -250,14 +180,7 @@ class XPathArticleEnhancerTest extends \PHPUnit_Framework_TestCase {
$item->setUrl('https://www.explosm.net/all/312');
$item->setBody('Hello thar');
- $this->fileFactory->expects($this->once())
- ->method('getFile')
- ->with($this->equalTo($item->getUrl()),
- $this->equalTo($this->timeout),
- $this->equalTo($this->redirects),
- $this->equalTo($this->headers),
- $this->equalTo($this->userAgent))
- ->will($this->returnValue($file));
+ $this->setUpFile($body, $encoding, $item->getUrl());
$result = $this->testEnhancer->enhance($item);
$this->assertEquals('<div>' .
@@ -272,9 +195,8 @@ class XPathArticleEnhancerTest extends \PHPUnit_Framework_TestCase {
}
public function testTransformRelativeUrlSpecials() {
- $file = new \stdClass;
- $file->headers = ["content-type"=>"text/html; charset=utf-8"];
- $file->body = '<html>
+ $encoding = 'utf-8';
+ $body = '<html>
<body>
<img src="relative/url.png?a=1&b=2">
</body>
@@ -283,14 +205,7 @@ class XPathArticleEnhancerTest extends \PHPUnit_Framework_TestCase {
$item->setUrl('https://username:secret@www.explosm.net/all/312');
$item->setBody('Hello thar');
- $this->fileFactory->expects($this->once())
- ->method('getFile')
- ->with($this->equalTo($item->getUrl()),
- $this->equalTo($this->timeout),
- $this->equalTo($this->redirects),
- $this->equalTo($this->headers),
- $this->equalTo($this->userAgent))
- ->will($this->returnValue($file));
+ $this->setUpFile($body, $encoding, $item->getUrl());
$result = $this->testEnhancer->enhance($item);
$this->assertEquals(
@@ -301,9 +216,8 @@ class XPathArticleEnhancerTest extends \PHPUnit_Framework_TestCase {
}
public function testDontTransformAbsoluteUrlsAndMails() {
- $file = new \stdClass;
- $file->headers = ["content-type"=>"text/html; charset=utf-8"];
- $file->body = '<html>
+ $encoding = 'utf-8';
+ $body = '<html>
<body>
<img src="http://www.url.com/absolute/url.png">
<a href="mailto:test@testsite.com">mail</a>
@@ -313,14 +227,7 @@ class XPathArticleEnhancerTest extends \PHPUnit_Framework_TestCase {
$item->setUrl('https://www.explosm.net/all/312');
$item->setBody('Hello thar');
- $this->fileFactory->expects($this->once())
- ->method('getFile')
- ->with($this->equalTo($item->getUrl()),
- $this->equalTo($this->timeout),
- $this->equalTo($this->redirects),
- $this->equalTo($this->headers),
- $this->equalTo($this->userAgent))
- ->will($this->returnValue($file));
+ $this->setUpFile($body, $encoding, $item->getUrl());
$result = $this->testEnhancer->enhance($item);
$this->assertEquals(
diff --git a/tests/unit/config/ConfigTest.php b/tests/unit/config/ConfigTest.php
index 9aaac57c5..a2739de59 100644
--- a/tests/unit/config/ConfigTest.php
+++ b/tests/unit/config/ConfigTest.php
@@ -42,7 +42,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase {
public function testDefaults() {
$this->assertEquals(60, $this->config->getAutoPurgeMinimumInterval());
$this->assertEquals(200, $this->config->getAutoPurgeCount());
- $this->assertEquals(30*60, $this->config->getCacheDuration());
+ $this->assertEquals(10, $this->config->getMaxRedirects());
$this->assertEquals(60, $this->config->getFeedFetcherTimeout());
$this->assertEquals(true, $this->config->getUseCronUpdates());
$this->assertEquals(8080, $this->config->getProxyPort());
@@ -128,13 +128,9 @@ class ConfigTest extends \PHPUnit_Framework_TestCase {
public function testWrite () {
$json = 'autoPurgeMinimumInterval = 60' . "\n" .
'autoPurgeCount = 3' . "\n" .
- 'cacheDuration = 1800' . "\n" .
+ 'maxRedirects = 10' . "\n" .
'feedFetcherTimeout = 60' . "\n" .
- 'useCronUpdates = true' . "\n" .
- 'proxyHost = yo man' . "\n" .
- 'proxyPort = 12' . "\n" .
- 'proxyUser = this is a test' . "\n".
- 'proxyPassword = se';
+ 'useCronUpdates = true';
$this->config->setAutoPurgeCount(3);
$this->config->setProxyHost('yo man');
$this->config->setProxyPort(12);
@@ -165,13 +161,9 @@ class ConfigTest extends \PHPUnit_Framework_TestCase {
$json = 'autoPurgeMinimumInterval = 60' . "\n" .
'autoPurgeCount = 200' . "\n" .
- 'cacheDuration = 1800' . "\n" .
+ 'maxRedirects = 10' . "\n" .
'feedFetcherTimeout = 60' . "\n" .
- 'useCronUpdates = false' . "\n" .
- 'proxyHost = ' . "\n" .
- 'proxyPort = 8080' . "\n" .
- 'proxyUser = ' . "\n" .
- 'proxyPassword = ';
+ 'useCronUpdates = false';
$this->fileSystem->expects($this->once())
->method('file_put_contents')
@@ -205,11 +197,11 @@ class ConfigTest extends \PHPUnit_Framework_TestCase {
$this->assertSame(61, $interval);
}
- public function testCacheDuration() {
- $this->config->setCacheDuration(21);
- $duration = $this->config->getCacheDuration();
+ public function testMaxRedirects() {
+ $this->config->setMaxRedirects(21);
+ $redirects = $this->config->getMaxRedirects();
- $this->assertSame(21, $duration);
+ $this->assertSame(21, $redirects);
}
public function testFeedFetcherTimeout() {
diff --git a/tests/unit/controller/AdminControllerTest.php b/tests/unit/controller/AdminControllerTest.php
index b468823da..4a9bf7764 100644
--- a/tests/unit/controller/AdminControllerTest.php
+++ b/tests/unit/controller/AdminControllerTest.php
@@ -45,7 +45,7 @@ class AdminControllerTest extends \PHPUnit_Framework_TestCase {
$expected = [
'autoPurgeMinimumInterval' => 1,
'autoPurgeCount' => 2,
- 'cacheDuration' => 3,
+ 'maxRedirects' => 3,
'feedFetcherTimeout' => 4,
'useCronUpdates' => 5
];
@@ -56,8 +56,8 @@ class AdminControllerTest extends \PHPUnit_Framework_TestCase {
->method('getAutoPurgeCount')
->will($this->returnValue($expected['autoPurgeCount']));
$this->config->expects($this->once())
- ->method('getCacheDuration')
- ->will($this->returnValue($expected['cacheDuration']));
+ ->method('getMaxRedirects')
+ ->will($this->returnValue($expected['maxRedirects']));
$this->config->expects($this->once())
->method('getFeedFetcherTimeout')
->will($this->returnValue($expected['feedFetcherTimeout']));
@@ -80,7 +80,7 @@ class AdminControllerTest extends \PHPUnit_Framework_TestCase {
$expected = [
'autoPurgeMinimumInterval' => 1,
'autoPurgeCount' => 2,
- 'cacheDuration' => 3,
+ 'maxRedirects' => 3,
'feedFetcherTimeout' => 4,
'useCronUpdates' => 5
];
@@ -92,8 +92,8 @@ class AdminControllerTest extends \PHPUnit_Framework_TestCase {
->method('setAutoPurgeCount')
->with($this->equalTo($expected['autoPurgeCount']));
$this->config->expects($this->once())
- ->method('setCacheDuration')
- ->with($this->equalTo($expected['cacheDuration']));
+ ->method('setMaxRedirects')
+ ->with($this->equalTo($expected['maxRedirects']));
$this->config->expects($this->once())
->method('setFeedFetcherTimeout')
->with($this->equalTo($expected['feedFetcherTimeout']));
@@ -111,8 +111,8 @@ class AdminControllerTest extends \PHPUnit_Framework_TestCase {
->method('getAutoPurgeCount')
->will($this->returnValue($expected['autoPurgeCount']));
$this->config->expects($this->once())
- ->method('getCacheDuration')
- ->will($this->returnValue($expected['cacheDuration']));
+ ->method('getMaxRedirects')
+ ->will($this->returnValue($expected['maxRedirects']));
$this->config->expects($this->once())
->method('getFeedFetcherTimeout')
->will($this->returnValue($expected['feedFetcherTimeout']));
@@ -123,7 +123,7 @@ class AdminControllerTest extends \PHPUnit_Framework_TestCase {
$response = $this->controller->update(
$expected['autoPurgeMinimumInterval'],
$expected['autoPurgeCount'],
- $expected['cacheDuration'],
+ $expected['maxRedirects'],
$expected['feedFetcherTimeout'],
$expected['useCronUpdates']
);
diff --git a/tests/unit/fetcher/FeedFetcherTest.php b/tests/unit/fetcher/FeedFetcherTest.php
index ff1581082..d87d88952 100644
--- a/tests/unit/fetcher/FeedFetcherTest.php
+++ b/tests/unit/fetcher/FeedFetcherTest.php
@@ -20,21 +20,14 @@ use \OCA\News\Db\Feed;
class FeedFetcherTest extends \PHPUnit_Framework_TestCase {
private $fetcher;
- private $core;
- private $coreFactory;
+ private $parser;
+ private $reader;
+ private $client;
private $faviconFetcher;
+ private $parsedFeed;
private $url;
- private $cacheDirectory;
- private $cacheDuration;
private $time;
private $item;
- private $purifier;
- private $fetchTimeout;
- private $proxyHost;
- private $getProxyPort;
- private $proxyAuth;
- private $config;
- private $appconfig;
// items
private $permalink;
@@ -53,41 +46,25 @@ class FeedFetcherTest extends \PHPUnit_Framework_TestCase {
private $webFavicon;
protected function setUp(){
- $this->core = $this->getMock(
- '\SimplePie_Core', [
- 'set_timeout',
- 'set_feed_url',
- 'enable_cache',
- 'set_stupidly_fast',
- 'set_cache_location',
- 'set_cache_duration',
- 'set_proxyhost',
- 'set_proxyport',
- 'set_proxyuserpwd',
- 'set_useragent',
- 'init',
- 'get_permalink',
- 'get_items',
- 'get_title',
- 'get_image_url'
- ]);
- $this->coreFactory = $this->getMockBuilder(
- '\OCA\News\Utility\SimplePieAPIFactory')
+ $this->reader = $this->getMockBuilder(
+ '\PicoFeed\Reader')
->disableOriginalConstructor()
->getMock();
- $this->coreFactory->expects($this->any())
- ->method('getCore')
- ->will($this->returnValue($this->core));
- $this->item = $this->getMockBuilder(
- '\SimplePie_Item')
+ $this->parser = $this->getMockBuilder(
+ '\PicoFeed\Parser')
->disableOriginalConstructor()
->getMock();
- $this->faviconFetcher = $this->getMockBuilder(
- '\PicoFeed\Favicon')
+ $this->client = $this->getMockBuilder(
+ '\PicoFeed\Client')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $this->parsedFeed = $this->getMockBuilder(
+ '\PicoFeed\Feed')
->disableOriginalConstructor()
->getMock();
- $this->appconfig = $this->getMockBuilder(
- '\OCA\News\Config\AppConfig')
+
+ $this->faviconFetcher = $this->getMockBuilder(
+ '\PicoFeed\Favicon')
->disableOriginalConstructor()
->getMock();
$this->time = 2323;
@@ -95,41 +72,9 @@ class FeedFetcherTest extends \PHPUnit_Framework_TestCase {
$timeFactory->expects($this->any())
->method('getTime')
->will($this->returnValue($this->time));
- $this->cacheDuration = 100;
- $this->cacheDirectory = 'dir/';
- $this->proxyHost = 'test';
- $this->proxyPort = 30;
- $this->proxyAuth = 'hi';
- $this->fetchTimeout = 40;
- $this->config = $this->getMockBuilder(
- '\OCA\News\Config\Config')
- ->disableOriginalConstructor()
- ->getMock();
- $this->config->expects($this->any())
- ->method('getCacheDuration')
- ->will($this->returnValue($this->cacheDuration));
- $this->config->expects($this->any())
- ->method('getProxyHost')
- ->will($this->returnValue($this->proxyHost));
- $this->config->expects($this->any())
- ->method('getProxyAuth')
- ->will($this->returnValue($this->proxyAuth));
- $this->config->expects($this->any())
- ->method('getProxyPort')
- ->will($this->returnValue($this->proxyPort));
- $this->config->expects($this->any())
- ->method('getFeedFetcherTimeout')
- ->will($this->returnValue($this->fetchTimeout));
- $this->appconfig->expects($this->any())
- ->method('getConfig')
- ->with($this->equalTo('version'))
- ->will($this->returnValue(3));
- $this->fetcher = new FeedFetcher($this->coreFactory,
+ $this->fetcher = new FeedFetcher($this->reader,
$this->faviconFetcher,
- $timeFactory,
- $this->cacheDirectory,
- $this->config,
- $this->appconfig);
+ $timeFactory);
$this->url = 'http://tests';
$this->permalink = 'http://permalink';
@@ -156,65 +101,35 @@ class FeedFetcherTest extends \PHPUnit_Framework_TestCase {
$this->assertTrue($this->fetcher->canHandle($url));
}
-
- public function testDoesNotUseProxyIfNotEnabled() {
- $this->config->expects($this->any())
- ->method('getProxyHost')
- ->will($this->returnValue(''));
- $this->core->expects($this->never())
- ->method('set_proxyhost');
- $this->core->expects($this->never())
- ->method('set_proxyport');
- $this->core->expects($this->never())
- ->method('set_proxyuserpwd');
+ private function setUpReader($url='', $modified=true) {
+ $this->reader->expects($this->once())
+ ->method('download')
+ ->with($this->equalTo($url))
+ ->will($this->returnValue($this->client));
+ $this->client->expects($this->once())
+ ->method('getLastModified')
+ ->with()</