Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix typos in method names
Signed-off-by: Daniel Calviño Sánchez <[email protected]>
  • Loading branch information
danxuliu committed Nov 16, 2020
commit f59238444a7df953442ce6687998ace41fd401fc
18 changes: 9 additions & 9 deletions tests/lib/Share20/ManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ public function testGeneralCheckShareRoot() {
}


public function testvalidateExpirationDateInPast() {
public function testValidateExpirationDateInPast() {
$this->expectException(\OCP\Share\Exceptions\GenericShareException::class);
$this->expectExceptionMessage('Expiration date is in the past');

Expand All @@ -782,7 +782,7 @@ public function testvalidateExpirationDateInPast() {
}


public function testvalidateExpirationDateEnforceButNotSet() {
public function testValidateExpirationDateEnforceButNotSet() {
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Expiration date is enforced');

Expand All @@ -798,7 +798,7 @@ public function testvalidateExpirationDateEnforceButNotSet() {
self::invokePrivate($this->manager, 'validateExpirationDate', [$share]);
}

public function testvalidateExpirationDateEnforceButNotEnabledAndNotSet() {
public function testValidateExpirationDateEnforceButNotEnabledAndNotSet() {
$share = $this->manager->newShare();
$share->setProviderId('foo')->setId('bar');

Expand All @@ -812,7 +812,7 @@ public function testvalidateExpirationDateEnforceButNotEnabledAndNotSet() {
$this->assertNull($share->getExpirationDate());
}

public function testvalidateExpirationDateEnforceButNotSetNewShare() {
public function testValidateExpirationDateEnforceButNotSetNewShare() {
$share = $this->manager->newShare();

$this->config->method('getAppValue')
Expand All @@ -833,7 +833,7 @@ public function testvalidateExpirationDateEnforceButNotSetNewShare() {
$this->assertEquals($expected, $share->getExpirationDate());
}

public function testvalidateExpirationDateEnforceToFarIntoFuture() {
public function testValidateExpirationDateEnforceTooFarIntoFuture() {
// Expire date in the past
$future = new \DateTime();
$future->add(new \DateInterval('P7D'));
Expand All @@ -857,7 +857,7 @@ public function testvalidateExpirationDateEnforceToFarIntoFuture() {
}
}

public function testvalidateExpirationDateEnforceValid() {
public function testValidateExpirationDateEnforceValid() {
// Expire date in the past
$future = new \DateTime();
$future->add(new \DateInterval('P2D'));
Expand Down Expand Up @@ -886,7 +886,7 @@ public function testvalidateExpirationDateEnforceValid() {
$this->assertEquals($expected, $share->getExpirationDate());
}

public function testvalidateExpirationDateNoDateNoDefaultNull() {
public function testValidateExpirationDateNoDateNoDefaultNull() {
$date = new \DateTime();
$date->add(new \DateInterval('P5D'));

Expand All @@ -907,7 +907,7 @@ public function testvalidateExpirationDateNoDateNoDefaultNull() {
$this->assertEquals($expected, $share->getExpirationDate());
}

public function testvalidateExpirationDateNoDateNoDefault() {
public function testValidateExpirationDateNoDateNoDefault() {
$hookListner = $this->getMockBuilder('Dummy')->setMethods(['listener'])->getMock();
\OCP\Util::connectHook('\OC\Share', 'verifyExpirationDate', $hookListner, 'listener');
$hookListner->expects($this->once())->method('listener')->with($this->callback(function ($data) {
Expand All @@ -922,7 +922,7 @@ public function testvalidateExpirationDateNoDateNoDefault() {
$this->assertNull($share->getExpirationDate());
}

public function testvalidateExpirationDateNoDateDefault() {
public function testValidateExpirationDateNoDateDefault() {
$future = new \DateTime();
$future->add(new \DateInterval('P3D'));
$future->setTime(0,0,0);
Expand Down