Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP Unit tests now execute #747

Merged
merged 3 commits into from
Feb 7, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Known
Known [![Build Status](https://travis-ci.org/idno/Known.svg?branch=master)](https://travis-ci.org/idno/Known)
=====
Known is a publishing platform for everyone.

Expand Down
7 changes: 2 additions & 5 deletions Tests/Homepage.php → Tests/HomepageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@

namespace Tests {

class Homepage extends \PHPUnit_Framework_TestCase {
class HomepageTest extends \PHPUnit_Framework_TestCase {

function testHomepageLoads() {

// Load Known framework
require_once(dirname(dirname(__FILE__)) . '/Idno/start.php');

// Get the rendered homepage
$contents = file_get_contents(\Idno\Core\site()->config()->url);
$contents = file_get_contents(\Idno\Core\site()->config()->url);

// Make sure it's not empty
$this->assertNotEmpty($contents);
Expand Down
4 changes: 3 additions & 1 deletion Tests/_bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
<?php
// This is global bootstrap for autoloading

// Load Known framework
require_once(dirname(dirname(__FILE__)) . '/Idno/start.php');
2 changes: 1 addition & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit colors="true">
<phpunit colors="true" bootstrap="./Tests/_bootstrap.php">
<testsuites>
<testsuite name="Idno Basic Unit Tests">
<directory>./Tests/</directory>
Expand Down