Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cdowdy committed Jun 7, 2016
1 parent 2a34a16 commit 4c78422
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/ExtensionTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace Bolt\Extension\cdowdy\boltresponsiveimages\Tests;

use Bolt\Tests\BoltUnitTest;
use Bolt\Extension\cdowdy\boltresponsiveimages\Extension;

/**
* Ensure that the ExtensionName extension loads correctly.
*
*/
class ExtensionTest extends BoltUnitTest
{
public function testExtensionRegister()
{
$app = $this->getApp();
$extension = new Extension($app);
$app['extensions']->register( $extension );
$name = $extension->getName();
$this->assertSame($name, 'ExtensionName');
$this->assertSame($extension, $app["extensions.$name"]);
}
}
6 changes: 6 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php
include_once __DIR__ . '/../vendor/bolt/bolt/tests/phpunit/bootstrap.php';

define('EXTENSION_AUTOLOAD', realpath(dirname(__DIR__) . '/vendor/autoload.php'));

require_once EXTENSION_AUTOLOAD;

0 comments on commit 4c78422

Please sign in to comment.