Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
284 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.idea | ||
.DS_Store | ||
.idea/* | ||
vendor/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
/* | ||
* (c) Lennart Hildebrandt <code@lennerd.com> | ||
*/ | ||
|
||
namespace Vipx\BotDetectBundle\Bot\Metadata\Loader; | ||
|
||
use Symfony\Component\Config\Resource\ResourceInterface; | ||
use Vipx\BotDetectBundle\Bot\Metadata\MetadataInterface; | ||
|
||
class MetadataCollection | ||
{ | ||
|
||
private $resources = array(); | ||
private $metadatas = array(); | ||
|
||
public function addResource(ResourceInterface $resource) | ||
{ | ||
$this->resources[] = $resource; | ||
} | ||
|
||
public function addMetadata(MetadataInterface $metadata) | ||
{ | ||
$this->metadatas[$metadata->getName()] = $metadata; | ||
} | ||
|
||
public function getResources() | ||
{ | ||
return $this->resources; | ||
} | ||
|
||
public function getMetadatas() | ||
{ | ||
return $this->metadatas; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
/* | ||
* (c) Lennart Hildebrandt <code@lennerd.com> | ||
*/ | ||
|
||
namespace Vipx\BotDetectBundle\Tests\Bot; | ||
|
||
class BotDetectorTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
|
||
public function testDetection() | ||
{ | ||
$this->markTestIncomplete(); | ||
} | ||
|
||
public function testSettingOptions() | ||
{ | ||
$this->markTestIncomplete(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
/* | ||
* (c) Lennart Hildebrandt <code@lennerd.com> | ||
*/ | ||
|
||
namespace Vipx\BotDetectBundle\Tests\Dumper; | ||
|
||
class PhpMetadataDumperTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
|
||
public function testDump() | ||
{ | ||
$this->markTestIncomplete(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
/* | ||
* (c) Lennart Hildebrandt <code@lennerd.com> | ||
*/ | ||
|
||
namespace Vipx\BotDetectBundle\Tests\Bot\Loader; | ||
|
||
class YamlFileLoaderTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
|
||
public function testParsing() | ||
{ | ||
$this->markTestIncomplete(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
/* | ||
* (c) Lennart Hildebrandt <code@lennerd.com> | ||
*/ | ||
|
||
namespace Vipx\BotDetectBundle\Tests\Bot; | ||
|
||
class MetadataTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
|
||
public function testMatchExact() | ||
{ | ||
$this->markTestIncomplete(); | ||
} | ||
|
||
public function testMatchRegexp() | ||
{ | ||
$this->markTestIncomplete(); | ||
} | ||
|
||
} |
17 changes: 17 additions & 0 deletions
17
Tests/DependencyInjection/Compiler/MetadataResolverPassTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
/* | ||
* (c) Lennart Hildebrandt <code@lennerd.com> | ||
*/ | ||
|
||
namespace Vipx\BotDetectBundle\Tests\DependencyInjection; | ||
|
||
class MetadataResolverPassTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
|
||
public function testAddingTaggedServices() | ||
{ | ||
$this->markTestIncomplete(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
/* | ||
* (c) Lennart Hildebrandt <code@lennerd.com> | ||
*/ | ||
|
||
namespace Vipx\BotDetectBundle\Tests\DependencyInjection; | ||
|
||
class VipxBotDetectExtensionTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
|
||
public function testListenerExtension() | ||
{ | ||
$this->markTestIncomplete(); | ||
} | ||
|
||
public function testParameters() | ||
{ | ||
$this->markTestIncomplete(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
/* | ||
* (c) Lennart Hildebrandt <code@lennerd.com> | ||
*/ | ||
|
||
namespace Vipx\BotDetectBundle\Tests\Security; | ||
|
||
class BotAuthenticationListenerTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
|
||
public function testSettingToken() | ||
{ | ||
$this->markTestIncomplete(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
/* | ||
* (c) Lennart Hildebrandt <code@lennerd.com> | ||
*/ | ||
|
||
namespace Vipx\BotDetectBundle\Tests\Security; | ||
|
||
class BotTokenTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
|
||
public function testBotRole() | ||
{ | ||
$this->markTestIncomplete(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the FOSUserBundle package. | ||
* | ||
* (c) FriendsOfSymfony <http://friendsofsymfony.github.com/> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
if (!is_file($autoloadFile = __DIR__.'/../vendor/autoload.php')) { | ||
throw new \LogicException('Could not find autoload.php in vendor/. Did you run "composer install --dev"?'); | ||
} | ||
|
||
require $autoloadFile; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<phpunit bootstrap="./Tests/bootstrap.php" colors="true"> | ||
|
||
<testsuites> | ||
<testsuite name="VipxBotDetectBundle test suite"> | ||
<directory suffix="Test.php">./Tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
</phpunit> |