Skip to content

Commit

Permalink
Extended code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
olvlvl committed Jan 19, 2016
1 parent 79061ee commit c9d90b5
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lib/ActiveRecord/Connection.php
Expand Up @@ -415,6 +415,8 @@ public function begin()

/**
* @inheritdoc
*
* @codeCoverageIgnore
*/
public function quote_string($string)
{
Expand All @@ -423,6 +425,8 @@ public function quote_string($string)

/**
* @inheritdoc
*
* @codeCoverageIgnore
*/
public function quote_identifier($identifier)
{
Expand All @@ -431,6 +435,8 @@ public function quote_identifier($identifier)

/**
* @inheritdoc
*
* @codeCoverageIgnore
*/
public function cast_value($value, $type = null)
{
Expand All @@ -439,6 +445,8 @@ public function cast_value($value, $type = null)

/**
* @inheritdoc
*
* @codeCoverageIgnore
*/
public function render_column(SchemaColumn $column)
{
Expand All @@ -447,6 +455,8 @@ public function render_column(SchemaColumn $column)

/**
* @inheritdoc
*
* @codeCoverageIgnore
*/
public function create_table($unprefixed_name, Schema $schema)
{
Expand All @@ -455,6 +465,8 @@ public function create_table($unprefixed_name, Schema $schema)

/**
* @inheritdoc
*
* @codeCoverageIgnore
*/
public function create_indexes($unprefixed_table_name, Schema $schema)
{
Expand All @@ -463,6 +475,8 @@ public function create_indexes($unprefixed_table_name, Schema $schema)

/**
* @inheritdoc
*
* @codeCoverageIgnore
*/
public function create_unique_indexes($unprefixed_table_name, Schema $schema)
{
Expand All @@ -471,6 +485,8 @@ public function create_unique_indexes($unprefixed_table_name, Schema $schema)

/**
* @inheritdoc
*
* @codeCoverageIgnore
*/
public function table_exists($unprefixed_name)
{
Expand All @@ -479,6 +495,8 @@ public function table_exists($unprefixed_name)

/**
* @inheritdoc
*
* @codeCoverageIgnore
*/
public function optimize()
{
Expand Down
2 changes: 2 additions & 0 deletions lib/ActiveRecord/DateProperty.php
Expand Up @@ -17,6 +17,8 @@
* Implements a `date` property.
*
* @property DateTime $date
*
* @codeCoverageIgnore
*/
trait DateProperty
{
Expand Down
2 changes: 2 additions & 0 deletions lib/ActiveRecord/FinishAtProperty.php
Expand Up @@ -19,6 +19,8 @@
* @see DateTimeProperty
*
* @property DateTime $finish_at
*
* @codeCoverageIgnore
*/
trait FinishAtProperty
{
Expand Down
2 changes: 2 additions & 0 deletions lib/ActiveRecord/FinishedAtProperty.php
Expand Up @@ -19,6 +19,8 @@
* @see DateTimeProperty
*
* @property DateTime $finished_at
*
* @codeCoverageIgnore
*/
trait FinishedAtProperty
{
Expand Down
2 changes: 2 additions & 0 deletions lib/ActiveRecord/StartAtProperty.php
Expand Up @@ -19,6 +19,8 @@
* @see DateTimeProperty
*
* @property DateTime $start_at
*
* @codeCoverageIgnore
*/
trait StartAtProperty
{
Expand Down
2 changes: 2 additions & 0 deletions lib/ActiveRecord/StartedAtProperty.php
Expand Up @@ -19,6 +19,8 @@
* @see DateTimeProperty
*
* @property DateTime $started_at
*
* @codeCoverageIgnore
*/
trait StartedAtProperty
{
Expand Down
23 changes: 23 additions & 0 deletions tests/ActiveRecord/DriverNotDefinedTest.php
@@ -0,0 +1,23 @@
<?php

/*
* This file is part of the ICanBoogie package.
*
* (c) Olivier Laviale <olivier.laviale@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace ICanBoogie\ActiveRecord;

class DriverNotDefinedTest extends \PHPUnit_Framework_TestCase
{
public function test_exception()
{
$driver_name = uniqid();
$exception = new DriverNotDefined($driver_name);
$this->assertSame($driver_name, $exception->driver_name);
$this->assertContains($driver_name, $exception->getMessage());
}
}

0 comments on commit c9d90b5

Please sign in to comment.