Skip to content

Commit

Permalink
Merge pull request #7 from core23/develop
Browse files Browse the repository at this point in the history
Fixed CS
  • Loading branch information
core23 committed May 10, 2019
2 parents fa7db92 + 88a894b commit d6b61f8
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 36 deletions.
7 changes: 4 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.* export-ignore
Makefile export-ignore
phpstan.neon export-ignore
phpunit.xml.dist export-ignore
docs/* export-ignore
tests/* export-ignore
vendor-bin/ export-ignore
/docs export-ignore
/tests export-ignore
/vendor-bin export-ignore
8 changes: 4 additions & 4 deletions tests/Action/AuthErrorActionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ public function testExecute(): void

$response = $action();

$this->assertNotInstanceOf(RedirectResponse::class, $response);
$this->assertSame(200, $response->getStatusCode());
static::assertNotInstanceOf(RedirectResponse::class, $response);
static::assertSame(200, $response->getStatusCode());
}

public function testExecuteWithCaughtEvent(): void
Expand Down Expand Up @@ -94,7 +94,7 @@ public function testExecuteWithCaughtEvent(): void

$response = $action();

$this->assertSame($eventResponse, $response);
static::assertSame($eventResponse, $response);
}

public function testExecuteWithNoAuth(): void
Expand All @@ -115,6 +115,6 @@ public function testExecuteWithNoAuth(): void
$this->eventDispatcher->reveal()
);

$this->assertInstanceOf(RedirectResponse::class, $action());
static::assertInstanceOf(RedirectResponse::class, $action());
}
}
10 changes: 5 additions & 5 deletions tests/Action/AuthSuccessActionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ public function testExecute(): void

$response = $action();

$this->assertNotInstanceOf(RedirectResponse::class, $response);
$this->assertSame(200, $response->getStatusCode());
static::assertNotInstanceOf(RedirectResponse::class, $response);
static::assertSame(200, $response->getStatusCode());
}

public function testExecuteWithCaughtEvent(): void
Expand Down Expand Up @@ -107,7 +107,7 @@ public function testExecuteWithCaughtEvent(): void

$response = $action();

$this->assertSame($eventResponse, $response);
static::assertSame($eventResponse, $response);
}

public function testExecuteNoAuth(): void
Expand All @@ -128,7 +128,7 @@ public function testExecuteNoAuth(): void
$this->eventDispatcher->reveal()
);

$this->assertInstanceOf(RedirectResponse::class, $action());
static::assertInstanceOf(RedirectResponse::class, $action());
}

public function testExecuteNoSession(): void
Expand All @@ -152,6 +152,6 @@ public function testExecuteNoSession(): void
$this->eventDispatcher->reveal()
);

$this->assertInstanceOf(RedirectResponse::class, $action());
static::assertInstanceOf(RedirectResponse::class, $action());
}
}
6 changes: 3 additions & 3 deletions tests/Action/CheckAuthActionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function testExecute(): void

$response = $action($request);

$this->assertSame('/success', $response->getTargetUrl());
static::assertSame('/success', $response->getTargetUrl());
}

public function testExecuteWithNoToken(): void
Expand All @@ -79,7 +79,7 @@ public function testExecuteWithNoToken(): void

$response = $action($request);

$this->assertSame('/auth', $response->getTargetUrl());
static::assertSame('/auth', $response->getTargetUrl());
}

public function testExecuteWithNoSession(): void
Expand All @@ -102,6 +102,6 @@ public function testExecuteWithNoSession(): void

$response = $action($request);

$this->assertSame('/error', $response->getTargetUrl());
static::assertSame('/error', $response->getTargetUrl());
}
}
2 changes: 1 addition & 1 deletion tests/Action/StartAuthActionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ public function testExecute(): void
$this->router->reveal()
);

$this->assertSame('https://lastFm/login', $action()->getTargetUrl());
static::assertSame('https://lastFm/login', $action()->getTargetUrl());
}
}
4 changes: 2 additions & 2 deletions tests/Core23LastFmBundleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ public function testItIsInstantiable(): void
{
$bundle = new Core23LastFmBundle();

$this->assertInstanceOf(BundleInterface::class, $bundle);
static::assertInstanceOf(BundleInterface::class, $bundle);
}

public function testGetContainerExtension(): void
{
$bundle = new Core23LastFmBundle();

$this->assertInstanceOf(Core23LastFmExtension::class, $bundle->getContainerExtension());
static::assertInstanceOf(Core23LastFmExtension::class, $bundle->getContainerExtension());
}
}
2 changes: 1 addition & 1 deletion tests/DependencyInjection/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ public function testOptions(): void
],
];

$this->assertSame($expected, $config);
static::assertSame($expected, $config);
}
}
6 changes: 3 additions & 3 deletions tests/Event/AuthFailedEventTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ public function testCreation(): void
{
$event = new AuthFailedEvent();

$this->assertInstanceOf(Event::class, $event);
static::assertInstanceOf(Event::class, $event);
}

public function testGetResponse(): void
{
$event = new AuthFailedEvent();

$this->assertNull($event->getResponse());
static::assertNull($event->getResponse());
}

public function testSetResponse(): void
Expand All @@ -37,6 +37,6 @@ public function testSetResponse(): void
$event = new AuthFailedEvent();
$event->setResponse($reponse->reveal());

$this->assertSame($reponse->reveal(), $event->getResponse());
static::assertSame($reponse->reveal(), $event->getResponse());
}
}
10 changes: 5 additions & 5 deletions tests/Event/AuthSuccessEventTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function testCreation(): void

$event = new AuthSuccessEvent($session->reveal());

$this->assertInstanceOf(Event::class, $event);
static::assertInstanceOf(Event::class, $event);
}

public function testGetUsername(): void
Expand All @@ -33,7 +33,7 @@ public function testGetUsername(): void

$event = new AuthSuccessEvent($session->reveal());

$this->assertSame('MyUser', $event->getUsername());
static::assertSame('MyUser', $event->getUsername());
}

public function testGetSession(): void
Expand All @@ -42,7 +42,7 @@ public function testGetSession(): void

$event = new AuthSuccessEvent($session->reveal());

$this->assertSame($session->reveal(), $event->getSession());
static::assertSame($session->reveal(), $event->getSession());
}

public function testGetResponse(): void
Expand All @@ -51,7 +51,7 @@ public function testGetResponse(): void

$event = new AuthSuccessEvent($session->reveal());

$this->assertNull($event->getResponse());
static::assertNull($event->getResponse());
}

public function testSetResponse(): void
Expand All @@ -63,6 +63,6 @@ public function testSetResponse(): void
$event = new AuthSuccessEvent($session->reveal());
$event->setResponse($reponse->reveal());

$this->assertSame($reponse->reveal(), $event->getResponse());
static::assertSame($reponse->reveal(), $event->getResponse());
}
}
18 changes: 9 additions & 9 deletions tests/Session/SessionManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function testIsAuthenticated(): void
;

$manager = new SessionManager($session->reveal());
$this->assertTrue($manager->isAuthenticated());
static::assertTrue($manager->isAuthenticated());
}

public function testIsNotAuthenticated(): void
Expand All @@ -36,7 +36,7 @@ public function testIsNotAuthenticated(): void
;

$manager = new SessionManager($session->reveal());
$this->assertFalse($manager->isAuthenticated());
static::assertFalse($manager->isAuthenticated());
}

public function testGetUsername(): void
Expand All @@ -47,7 +47,7 @@ public function testGetUsername(): void
;

$manager = new SessionManager($session->reveal());
$this->assertSame('MyUser', $manager->getUsername());
static::assertSame('MyUser', $manager->getUsername());
}

public function testGetUsernameNotExist(): void
Expand All @@ -58,7 +58,7 @@ public function testGetUsernameNotExist(): void
;

$manager = new SessionManager($session->reveal());
$this->assertNull($manager->getUsername());
static::assertNull($manager->getUsername());
}

public function testStore(): void
Expand All @@ -72,7 +72,7 @@ public function testStore(): void
$manager = new SessionManager($session->reveal());
$manager->store($lastfmSession);

$this->assertTrue(true);
static::assertTrue(true);
}

public function testClear(): void
Expand Down Expand Up @@ -100,9 +100,9 @@ public function testGetSession(): void
/** @var SessionInterface $lastfmSession */
$lastfmSession = $manager->getSession();

$this->assertNotNull($lastfmSession);
$this->assertSame('MyUser', $lastfmSession->getName());
$this->assertSame('TheToken', $lastfmSession->getKey());
static::assertNotNull($lastfmSession);
static::assertSame('MyUser', $lastfmSession->getName());
static::assertSame('TheToken', $lastfmSession->getKey());
}

public function testGetSessionWithNoAuth(): void
Expand All @@ -114,6 +114,6 @@ public function testGetSessionWithNoAuth(): void

$manager = new SessionManager($session->reveal());

$this->assertNull($manager->getSession());
static::assertNull($manager->getSession());
}
}

0 comments on commit d6b61f8

Please sign in to comment.