forked from prestaconcept/PrestaSitemapBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[testing] configure bundle to test it on travis-CI
- Loading branch information
David Epely
committed
Jul 3, 2012
1 parent
ed31d10
commit 5486c8c
Showing
8 changed files
with
112 additions
and
1 deletion.
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 +1,4 @@ | ||
*~ | ||
Tests/app/cache/ | ||
composer.lock | ||
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 |
---|---|---|
|
@@ -6,4 +6,8 @@ php: | |
before_script: | ||
- wget http://getcomposer.org/composer.phar | ||
- php composer.phar install | ||
|
||
|
||
notifications: | ||
email: | ||
- [email protected] | ||
|
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
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,35 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the prestaSitemapPlugin package. | ||
* (c) David Epely <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
use Symfony\Component\HttpKernel\Kernel; | ||
use Symfony\Component\Config\Loader\LoaderInterface; | ||
|
||
class AppKernel extends Kernel | ||
{ | ||
public function registerBundles() | ||
{ | ||
$bundles = array( | ||
// Dependencies | ||
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), | ||
new Symfony\Bundle\SecurityBundle\SecurityBundle(), | ||
//new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), | ||
//new JMS\SerializerBundle\JMSSerializerBundle($this), | ||
new Presta\SitemapBundle\PrestaSitemapBundle(), | ||
); | ||
|
||
return $bundles; | ||
} | ||
|
||
public function registerContainerConfiguration(LoaderInterface $loader) | ||
{ | ||
// We dont need that Environment stuff, just one config | ||
$loader->load(__DIR__.'/config.yml'); | ||
} | ||
} |
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,12 @@ | ||
framework: | ||
secret: secret | ||
test: ~ | ||
router: { resource: "%kernel.root_dir%/routing.yml" } | ||
form: true | ||
csrf_protection: true | ||
validation: { enable_annotations: true } | ||
session: | ||
storage_id: session.storage.filesystem | ||
|
||
|
||
|
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,3 @@ | ||
PrestaSitemapBundle: | ||
resource: "@PrestaSitemapBundle/Resources/config/routing.yml" | ||
prefix: / |
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,26 @@ | ||
<?php | ||
/* | ||
* This file is part of the prestaSitemapPlugin package. | ||
* (c) David Epely <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
if (file_exists($file = __DIR__ . '/../vendor/autoload.php')) { | ||
require_once $file; | ||
} else { | ||
throw new \RuntimeException('Dependencies are required'); | ||
} | ||
|
||
spl_autoload_register(function($class) { | ||
if (0 === strpos($class, 'Presta\\SitemapBundle\\PrestaSitemapBundle')) { | ||
$path = __DIR__ . '/../' . implode('/', array_slice(explode('\\', $class), 3)) . '.php'; | ||
if (!stream_resolve_include_path($path)) { | ||
return false; | ||
} | ||
require_once $path; | ||
return true; | ||
} | ||
}); | ||
|
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,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<phpunit bootstrap="./Tests/bootstrap.php" colors="true"> | ||
|
||
<php> | ||
<server name="KERNEL_DIR" value="Tests/app" /> | ||
</php> | ||
|
||
<testsuites> | ||
<testsuite name="PrestaSitemapBundle test suite"> | ||
<directory suffix="Test.php">./Tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<filter> | ||
<whitelist> | ||
<directory>./</directory> | ||
<exclude> | ||
<directory>./Resources</directory> | ||
<directory>./Tests</directory> | ||
<directory>./vendor</directory> | ||
</exclude> | ||
</whitelist> | ||
</filter> | ||
</phpunit> | ||
|