Fix typos in method names
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
parent
67f58b9c5f
commit
bd431e2e59
|
@ -765,7 +765,7 @@ class ManagerTest extends \Test\TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function testvalidateExpirationDateInPast() {
|
public function testValidateExpirationDateInPast() {
|
||||||
$this->expectException(\OCP\Share\Exceptions\GenericShareException::class);
|
$this->expectException(\OCP\Share\Exceptions\GenericShareException::class);
|
||||||
$this->expectExceptionMessage('Expiration date is in the past');
|
$this->expectExceptionMessage('Expiration date is in the past');
|
||||||
|
|
||||||
|
@ -781,7 +781,7 @@ class ManagerTest extends \Test\TestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function testvalidateExpirationDateEnforceButNotSet() {
|
public function testValidateExpirationDateEnforceButNotSet() {
|
||||||
$this->expectException(\InvalidArgumentException::class);
|
$this->expectException(\InvalidArgumentException::class);
|
||||||
$this->expectExceptionMessage('Expiration date is enforced');
|
$this->expectExceptionMessage('Expiration date is enforced');
|
||||||
|
|
||||||
|
@ -797,7 +797,7 @@ class ManagerTest extends \Test\TestCase {
|
||||||
self::invokePrivate($this->manager, 'validateExpirationDate', [$share]);
|
self::invokePrivate($this->manager, 'validateExpirationDate', [$share]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testvalidateExpirationDateEnforceButNotEnabledAndNotSet() {
|
public function testValidateExpirationDateEnforceButNotEnabledAndNotSet() {
|
||||||
$share = $this->manager->newShare();
|
$share = $this->manager->newShare();
|
||||||
$share->setProviderId('foo')->setId('bar');
|
$share->setProviderId('foo')->setId('bar');
|
||||||
|
|
||||||
|
@ -811,7 +811,7 @@ class ManagerTest extends \Test\TestCase {
|
||||||
$this->assertNull($share->getExpirationDate());
|
$this->assertNull($share->getExpirationDate());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testvalidateExpirationDateEnforceButNotSetNewShare() {
|
public function testValidateExpirationDateEnforceButNotSetNewShare() {
|
||||||
$share = $this->manager->newShare();
|
$share = $this->manager->newShare();
|
||||||
|
|
||||||
$this->config->method('getAppValue')
|
$this->config->method('getAppValue')
|
||||||
|
@ -832,7 +832,7 @@ class ManagerTest extends \Test\TestCase {
|
||||||
$this->assertEquals($expected, $share->getExpirationDate());
|
$this->assertEquals($expected, $share->getExpirationDate());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testvalidateExpirationDateEnforceToFarIntoFuture() {
|
public function testValidateExpirationDateEnforceTooFarIntoFuture() {
|
||||||
// Expire date in the past
|
// Expire date in the past
|
||||||
$future = new \DateTime();
|
$future = new \DateTime();
|
||||||
$future->add(new \DateInterval('P7D'));
|
$future->add(new \DateInterval('P7D'));
|
||||||
|
@ -856,7 +856,7 @@ class ManagerTest extends \Test\TestCase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testvalidateExpirationDateEnforceValid() {
|
public function testValidateExpirationDateEnforceValid() {
|
||||||
// Expire date in the past
|
// Expire date in the past
|
||||||
$future = new \DateTime();
|
$future = new \DateTime();
|
||||||
$future->add(new \DateInterval('P2D'));
|
$future->add(new \DateInterval('P2D'));
|
||||||
|
@ -885,7 +885,7 @@ class ManagerTest extends \Test\TestCase {
|
||||||
$this->assertEquals($expected, $share->getExpirationDate());
|
$this->assertEquals($expected, $share->getExpirationDate());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testvalidateExpirationDateNoDateNoDefaultNull() {
|
public function testValidateExpirationDateNoDateNoDefaultNull() {
|
||||||
$date = new \DateTime();
|
$date = new \DateTime();
|
||||||
$date->add(new \DateInterval('P5D'));
|
$date->add(new \DateInterval('P5D'));
|
||||||
|
|
||||||
|
@ -906,7 +906,7 @@ class ManagerTest extends \Test\TestCase {
|
||||||
$this->assertEquals($expected, $share->getExpirationDate());
|
$this->assertEquals($expected, $share->getExpirationDate());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testvalidateExpirationDateNoDateNoDefault() {
|
public function testValidateExpirationDateNoDateNoDefault() {
|
||||||
$hookListner = $this->getMockBuilder('Dummy')->setMethods(['listener'])->getMock();
|
$hookListner = $this->getMockBuilder('Dummy')->setMethods(['listener'])->getMock();
|
||||||
\OCP\Util::connectHook('\OC\Share', 'verifyExpirationDate', $hookListner, 'listener');
|
\OCP\Util::connectHook('\OC\Share', 'verifyExpirationDate', $hookListner, 'listener');
|
||||||
$hookListner->expects($this->once())->method('listener')->with($this->callback(function ($data) {
|
$hookListner->expects($this->once())->method('listener')->with($this->callback(function ($data) {
|
||||||
|
@ -921,7 +921,7 @@ class ManagerTest extends \Test\TestCase {
|
||||||
$this->assertNull($share->getExpirationDate());
|
$this->assertNull($share->getExpirationDate());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testvalidateExpirationDateNoDateDefault() {
|
public function testValidateExpirationDateNoDateDefault() {
|
||||||
$future = new \DateTime();
|
$future = new \DateTime();
|
||||||
$future->add(new \DateInterval('P3D'));
|
$future->add(new \DateInterval('P3D'));
|
||||||
$future->setTime(0,0,0);
|
$future->setTime(0,0,0);
|
||||||
|
|
Loading…
Reference in New Issue