setClass() public method

Sets a class for the upgrade
public setClass ( string $class ) : void
$class string Fully qualified class name
return void
示例#1
0
 public function testCanInstantiateBatchRunner()
 {
     $this->obj->setClass('\\InvalidClass');
     $this->assertFalse($this->obj->getBatch());
     $this->obj->setClass(\Elgg\Upgrade\InvalidBatch::class);
     $this->assertFalse($this->obj->getBatch());
     $this->obj->setClass(\Elgg\Upgrade\TestBatch::class);
     $this->assertInstanceOf(\Elgg\Upgrade\TestBatch::class, $this->obj->getBatch());
 }