}
function provideFindLowerBound() {
- $that = $this;
- $indexValueCallback = function ( $size ) use ( $that ) {
- return function ( $val ) use ( $that, $size ) {
- $that->assertTrue( $val >= 0 );
- $that->assertTrue( $val < $size );
+ $indexValueCallback = function ( $size ) {
+ return function ( $val ) use ( $size ) {
+ $this->assertTrue( $val >= 0 );
+ $this->assertTrue( $val < $size );
return $val;
};
};
->disableOriginalConstructor()
->getMock();
- // php 5.3 compatibility!
- $that = $this;
-
$dbSiteStore->expects( $this->any() )
->method( 'getSite' )
- ->will( $this->returnValue( $that->getTestSite() ) );
+ ->will( $this->returnValue( $this->getTestSite() ) );
$dbSiteStore->expects( $this->any() )
->method( 'getSites' )
- ->will( $this->returnCallback( function() use ( $that ) {
+ ->will( $this->returnCallback( function() {
$siteList = new SiteList();
- $siteList->setSite( $that->getTestSite() );
+ $siteList->setSite( $this->getTestSite() );
return $siteList;
} ) );
private function newSiteImporter( array $expectedSites, $errorCount ) {
$store = $this->getMock( 'SiteStore' );
- $that = $this;
$store->expects( $this->once() )
->method( 'saveSites' )
- ->will( $this->returnCallback( function ( $sites ) use ( $expectedSites, $that ) {
- $that->assertSitesEqual( $expectedSites, $sites );
+ ->will( $this->returnCallback( function ( $sites ) use ( $expectedSites ) {
+ $this->assertSitesEqual( $expectedSites, $sites );
} ) );
$store->expects( $this->any() )