Skip to content

Commit 823b02d

Browse files
authored
Merge pull request #3 from calderacc/tests
Tests
2 parents fd44451 + 25344cf commit 823b02d

38 files changed

Lines changed: 1120 additions & 302 deletions

tests/Network/DiscordChatTest.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php declare(strict_types=1);
2+
3+
namespace Caldera\SocialNetworkBundle\Tests\Network;
4+
5+
use Caldera\SocialNetworkBundle\Network\DiscordChat;
6+
use PHPUnit\Framework\TestCase;
7+
8+
class DiscordChatTest extends TestCase
9+
{
10+
public function testName(): void
11+
{
12+
$this->assertEquals('Discord-Chat', (new DiscordChat())->getName());
13+
}
14+
15+
public function testIdentifier(): void
16+
{
17+
$this->assertEquals('discord_chat', (new DiscordChat())->getIdentifier());
18+
}
19+
20+
public function testBackgroundcolor(): void
21+
{
22+
$this->assertEquals('rgb(114, 137, 218)', (new DiscordChat())->getBackgroundColor());
23+
}
24+
25+
public function testTextColor(): void
26+
{
27+
$this->assertEquals('white', (new DiscordChat())->getTextColor());
28+
}
29+
30+
public function testIcon(): void
31+
{
32+
$this->assertEquals('fa-discord', (new DiscordChat())->getIcon());
33+
}
34+
35+
public function testDetectorPriority(): void
36+
{
37+
$this->assertEquals(0, (new DiscordChat())->getDetectorPriority());
38+
}
39+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php declare(strict_types=1);
2+
3+
namespace Caldera\SocialNetworkBundle\Tests\Network;
4+
5+
use Caldera\SocialNetworkBundle\Network\FacebookEvent;
6+
use PHPUnit\Framework\TestCase;
7+
8+
class FacebookEventTest extends TestCase
9+
{
10+
public function testName(): void
11+
{
12+
$this->assertEquals('facebook-Event', (new FacebookEvent())->getName());
13+
}
14+
15+
public function testIdentifier(): void
16+
{
17+
$this->assertEquals('facebook_event', (new FacebookEvent())->getIdentifier());
18+
}
19+
20+
public function testBackgroundcolor(): void
21+
{
22+
$this->assertEquals('rgb(60, 88, 152)', (new FacebookEvent())->getBackgroundColor());
23+
}
24+
25+
public function testTextColor(): void
26+
{
27+
$this->assertEquals('white', (new FacebookEvent())->getTextColor());
28+
}
29+
30+
public function testIcon(): void
31+
{
32+
$this->assertEquals('fa-facebook', (new FacebookEvent())->getIcon());
33+
}
34+
35+
public function testDetectorPriority(): void
36+
{
37+
$this->assertEquals(0, (new FacebookEvent())->getDetectorPriority());
38+
}
39+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php declare(strict_types=1);
2+
3+
namespace Caldera\SocialNetworkBundle\Tests\Network;
4+
5+
use Caldera\SocialNetworkBundle\Network\FacebookGroup;
6+
use PHPUnit\Framework\TestCase;
7+
8+
class FacebookGroupTest extends TestCase
9+
{
10+
public function testName(): void
11+
{
12+
$this->assertEquals('facebook-Gruppe', (new FacebookGroup())->getName());
13+
}
14+
15+
public function testIdentifier(): void
16+
{
17+
$this->assertEquals('facebook_group', (new FacebookGroup())->getIdentifier());
18+
}
19+
20+
public function testBackgroundcolor(): void
21+
{
22+
$this->assertEquals('rgb(60, 88, 152)', (new FacebookGroup())->getBackgroundColor());
23+
}
24+
25+
public function testTextColor(): void
26+
{
27+
$this->assertEquals('white', (new FacebookGroup())->getTextColor());
28+
}
29+
30+
public function testIcon(): void
31+
{
32+
$this->assertEquals('fa-facebook', (new FacebookGroup())->getIcon());
33+
}
34+
35+
public function testDetectorPriority(): void
36+
{
37+
$this->assertEquals(0, (new FacebookGroup())->getDetectorPriority());
38+
}
39+
}

tests/Network/FacebookPageTest.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php declare(strict_types=1);
2+
3+
namespace Caldera\SocialNetworkBundle\Tests\Network;
4+
5+
use Caldera\SocialNetworkBundle\Network\FacebookPage;
6+
use PHPUnit\Framework\TestCase;
7+
8+
class FacebookPageTest extends TestCase
9+
{
10+
public function testName(): void
11+
{
12+
$this->assertEquals('facebook-Seite', (new FacebookPage())->getName());
13+
}
14+
15+
public function testIdentifier(): void
16+
{
17+
$this->assertEquals('facebook_page', (new FacebookPage())->getIdentifier());
18+
}
19+
20+
public function testBackgroundcolor(): void
21+
{
22+
$this->assertEquals('rgb(60, 88, 152)', (new FacebookPage())->getBackgroundColor());
23+
}
24+
25+
public function testTextColor(): void
26+
{
27+
$this->assertEquals('white', (new FacebookPage())->getTextColor());
28+
}
29+
30+
public function testIcon(): void
31+
{
32+
$this->assertEquals('fa-facebook', (new FacebookPage())->getIcon());
33+
}
34+
35+
public function testDetectorPriority(): void
36+
{
37+
$this->assertEquals(0, (new FacebookPage())->getDetectorPriority());
38+
}
39+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php declare(strict_types=1);
2+
3+
namespace Caldera\SocialNetworkBundle\Tests\Network;
4+
5+
use Caldera\SocialNetworkBundle\Network\FacebookProfile;
6+
use PHPUnit\Framework\TestCase;
7+
8+
class FacebookProfileTest extends TestCase
9+
{
10+
public function testName(): void
11+
{
12+
$this->assertEquals('facebook-Profil', (new FacebookProfile())->getName());
13+
}
14+
15+
public function testIdentifier(): void
16+
{
17+
$this->assertEquals('facebook_profile', (new FacebookProfile())->getIdentifier());
18+
}
19+
20+
public function testBackgroundcolor(): void
21+
{
22+
$this->assertEquals('rgb(60, 88, 152)', (new FacebookProfile())->getBackgroundColor());
23+
}
24+
25+
public function testTextColor(): void
26+
{
27+
$this->assertEquals('white', (new FacebookProfile())->getTextColor());
28+
}
29+
30+
public function testIcon(): void
31+
{
32+
$this->assertEquals('fa-facebook', (new FacebookProfile())->getIcon());
33+
}
34+
35+
public function testDetectorPriority(): void
36+
{
37+
$this->assertEquals(0, (new FacebookProfile())->getDetectorPriority());
38+
}
39+
}

tests/Network/FlickrTest.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php declare(strict_types=1);
2+
3+
namespace Caldera\SocialNetworkBundle\Tests\Network;
4+
5+
use Caldera\SocialNetworkBundle\Network\Flickr;
6+
use PHPUnit\Framework\TestCase;
7+
8+
class FlickrTest extends TestCase
9+
{
10+
public function testName(): void
11+
{
12+
$this->assertEquals('flickr', (new Flickr())->getName());
13+
}
14+
15+
public function testIdentifier(): void
16+
{
17+
$this->assertEquals('flickr', (new Flickr())->getIdentifier());
18+
}
19+
20+
public function testBackgroundcolor(): void
21+
{
22+
$this->assertEquals('rgb(12, 101, 211)', (new Flickr())->getBackgroundColor());
23+
}
24+
25+
public function testTextColor(): void
26+
{
27+
$this->assertEquals('white', (new Flickr())->getTextColor());
28+
}
29+
30+
public function testIcon(): void
31+
{
32+
$this->assertEquals('fa-flickr', (new Flickr())->getIcon());
33+
}
34+
35+
public function testDetectorPriority(): void
36+
{
37+
$this->assertEquals(0, (new Flickr())->getDetectorPriority());
38+
}
39+
}

tests/Network/GoogleTest.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php declare(strict_types=1);
2+
3+
namespace Caldera\SocialNetworkBundle\Tests\Network;
4+
5+
use Caldera\SocialNetworkBundle\Network\Google;
6+
use PHPUnit\Framework\TestCase;
7+
8+
class GoogleTest extends TestCase
9+
{
10+
public function testName(): void
11+
{
12+
$this->assertEquals('Google+', (new Google())->getName());
13+
}
14+
15+
public function testIdentifier(): void
16+
{
17+
$this->assertEquals('google', (new Google())->getIdentifier());
18+
}
19+
20+
public function testBackgroundcolor(): void
21+
{
22+
$this->assertEquals('rgb(234, 66, 53)', (new Google())->getBackgroundColor());
23+
}
24+
25+
public function testTextColor(): void
26+
{
27+
$this->assertEquals('white', (new Google())->getTextColor());
28+
}
29+
30+
public function testIcon(): void
31+
{
32+
$this->assertEquals('fa-google-plus', (new Google())->getIcon());
33+
}
34+
35+
public function testDetectorPriority(): void
36+
{
37+
$this->assertEquals(0, (new Google())->getDetectorPriority());
38+
}
39+
}

tests/Network/HomepageTest.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php declare(strict_types=1);
2+
3+
namespace Caldera\SocialNetworkBundle\Tests\Network;
4+
5+
use Caldera\SocialNetworkBundle\Network\Homepage;
6+
use PHPUnit\Framework\TestCase;
7+
8+
class HomepageTest extends TestCase
9+
{
10+
public function testName(): void
11+
{
12+
$this->assertEquals('Homepage', (new Homepage())->getName());
13+
}
14+
15+
public function testIdentifier(): void
16+
{
17+
$this->assertEquals('homepage', (new Homepage())->getIdentifier());
18+
}
19+
20+
public function testBackgroundcolor(): void
21+
{
22+
$this->assertEquals('white', (new Homepage())->getBackgroundColor());
23+
}
24+
25+
public function testTextColor(): void
26+
{
27+
$this->assertEquals('black', (new Homepage())->getTextColor());
28+
}
29+
30+
public function testIcon(): void
31+
{
32+
$this->assertEquals('fa-globe', (new Homepage())->getIcon());
33+
}
34+
35+
public function testDetectorPriority(): void
36+
{
37+
$this->assertEquals(-100, (new Homepage())->getDetectorPriority());
38+
}
39+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php declare(strict_types=1);
2+
3+
namespace Caldera\SocialNetworkBundle\Tests\Network;
4+
5+
use Caldera\SocialNetworkBundle\Network\InstagramPhoto;
6+
use PHPUnit\Framework\TestCase;
7+
8+
class InstagramPhotoTest extends TestCase
9+
{
10+
public function testName(): void
11+
{
12+
$this->assertEquals('Instagram-Foto', (new InstagramPhoto())->getName());
13+
}
14+
15+
public function testIdentifier(): void
16+
{
17+
$this->assertEquals('instagram_photo', (new InstagramPhoto())->getIdentifier());
18+
}
19+
20+
public function testBackgroundcolor(): void
21+
{
22+
$this->assertEquals('rgb(203, 44, 128)', (new InstagramPhoto())->getBackgroundColor());
23+
}
24+
25+
public function testTextColor(): void
26+
{
27+
$this->assertEquals('white', (new InstagramPhoto())->getTextColor());
28+
}
29+
30+
public function testIcon(): void
31+
{
32+
$this->assertEquals('fa-instagram', (new InstagramPhoto())->getIcon());
33+
}
34+
35+
public function testDetectorPriority(): void
36+
{
37+
$this->assertEquals(0, (new InstagramPhoto())->getDetectorPriority());
38+
}
39+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php declare(strict_types=1);
2+
3+
namespace Caldera\SocialNetworkBundle\Tests\Network;
4+
5+
use Caldera\SocialNetworkBundle\Network\InstagramProfile;
6+
use PHPUnit\Framework\TestCase;
7+
8+
class InstagramProfileTest extends TestCase
9+
{
10+
public function testName(): void
11+
{
12+
$this->assertEquals('Instagram-Profil', (new InstagramProfile())->getName());
13+
}
14+
15+
public function testIdentifier(): void
16+
{
17+
$this->assertEquals('instagram_profile', (new InstagramProfile())->getIdentifier());
18+
}
19+
20+
public function testBackgroundcolor(): void
21+
{
22+
$this->assertEquals('rgb(203, 44, 128)', (new InstagramProfile())->getBackgroundColor());
23+
}
24+
25+
public function testTextColor(): void
26+
{
27+
$this->assertEquals('white', (new InstagramProfile())->getTextColor());
28+
}
29+
30+
public function testIcon(): void
31+
{
32+
$this->assertEquals('fa-instagram', (new InstagramProfile())->getIcon());
33+
}
34+
35+
public function testDetectorPriority(): void
36+
{
37+
$this->assertEquals(0, (new InstagramProfile())->getDetectorPriority());
38+
}
39+
}

0 commit comments

Comments
 (0)