Skip to content

Commit

Permalink
Setup as composer library.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinkhill committed Mar 17, 2015
1 parent eb6acf0 commit 60e7529
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 23 deletions.
32 changes: 14 additions & 18 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
{
"name": "khill/durations",
"description": "Converts between colon formatted time, human-readable time and seconds.",
"keywords": ["durations", "time", "convert"],
"license": "MIT",
"name": "khill/php-duration",
"description": "Converts between colon formatted time, human-readable time and seconds",
"license": "MIT",
"authors": [
{
"name" : "Kevin Hill",
"email": "kevinkhill@gmail.com",
"role" : "Developer"
"name": "Kevin Hill",
"email": "kevinkhill@gmail.com"
}
],
"require": {
"php": ">=5.3.0"
},
"require-dev" : {
"phpunit/phpunit": "4.5.*"
},
"autoload": {
"psr-4": {
"Khill\\Durations\\" : "src"
}
}
"require-dev": {
"phpunit/phpunit": "~4.5"
},
"autoload": {
"psr-4": {
"Khill\\Duration\\": "src/"
}
},
"minimum-stability": "stable"
}
17 changes: 17 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit bootstrap="./vendor/autoload.php"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
strict="true"
syntaxCheck="true"
verbose="true"
colors="true"
>
<testsuites>
<testsuite name="Package Test Suite">
<directory suffix=".php">test/</directory>
</testsuite>
</testsuites>
</phpunit>
4 changes: 2 additions & 2 deletions src/Durations.php → src/Duration.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php namespace Khill;
<?php namespace Khill\Duration;

class Durations {
class Duration {

public $hours;
public $minutes;
Expand Down
6 changes: 3 additions & 3 deletions tests/DurationsTest.php → test/DurationTest.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

use Khill\Durations;
use Khill\Duration\Duration;

class DurationsTest extends Phpunit_Framework_TestCase {
class DurationTest extends PHPUnit_Framework_TestCase {

public function setUp()
{
parent::setUp();

$this->d = new Durations;
$this->d = new Duration;
}

public function secondsSampleData()
Expand Down

0 comments on commit 60e7529

Please sign in to comment.