Aura\Di PHPUnit testing

9 views
Skip to first unread message

Chris Johnson

unread,
Feb 27, 2017, 5:55:36 PM2/27/17
to The Aura Project for PHP
I've got a PHPUnit test of an Aura\Di container configuration which looks like this:

<?php

use
Aura\Di\AbstractContainerConfigTest;

class _ConfigTest extends AbstractContainerConfigTest
{
    protected function getConfigClasses()
    {
        return array(
            'Aura\Auth\_Config\Common',
            'My\_Config',
        );
    }

    protected function getAutoResolve()
    {
        return false;
    }

    public function provideNewInstance()
    {
        return [
            [Service\UserService::CLASS],
        ];
    }
}

When I run my unit tests, PHPUnit skips one test, with the following message. 
$ phpunit -v
PHPUnit 5.7.5 by Sebastian Bergmann and contributors.

......................................S.                          40 / 40 (100%)

There was 1 skipped test:

1) My\_ConfigTest::testGet with data set #0 (null, null)
No service name passed for testGet().

/project/domain/vendor/aura/di/tests/AbstractContainerConfigTest.php:88

OK
, but incomplete, skipped, or risky tests!
Tests: 40, Assertions: 61, Skipped: 1.

 I like to make all of my tests be 100% green, with no skips, so how do I fix this?

Reply all
Reply to author
Forward
0 new messages