Kohana v3.3.0
This commit is contained in:
26
vendor/phpunit/php-code-coverage/Tests/_files/BankAccount-clover.xml
vendored
Normal file
26
vendor/phpunit/php-code-coverage/Tests/_files/BankAccount-clover.xml
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<coverage generated="%i">
|
||||
<project timestamp="%i" name="BankAccount">
|
||||
<file name="%s/BankAccount.php">
|
||||
<class name="BankAccount" namespace="global">
|
||||
<metrics methods="4" coveredmethods="3" conditionals="0" coveredconditionals="0" statements="10" coveredstatements="5" elements="14" coveredelements="8"/>
|
||||
</class>
|
||||
<line num="6" type="method" name="getBalance" crap="1" count="2"/>
|
||||
<line num="8" type="stmt" count="2"/>
|
||||
<line num="11" type="method" name="setBalance" crap="6" count="0"/>
|
||||
<line num="13" type="stmt" count="0"/>
|
||||
<line num="14" type="stmt" count="0"/>
|
||||
<line num="15" type="stmt" count="0"/>
|
||||
<line num="16" type="stmt" count="0"/>
|
||||
<line num="18" type="stmt" count="0"/>
|
||||
<line num="20" type="method" name="depositMoney" crap="1" count="2"/>
|
||||
<line num="22" type="stmt" count="2"/>
|
||||
<line num="24" type="stmt" count="1"/>
|
||||
<line num="27" type="method" name="withdrawMoney" crap="1" count="2"/>
|
||||
<line num="29" type="stmt" count="2"/>
|
||||
<line num="31" type="stmt" count="1"/>
|
||||
<metrics loc="33" ncloc="33" classes="1" methods="4" coveredmethods="3" conditionals="0" coveredconditionals="0" statements="10" coveredstatements="5" elements="14" coveredelements="8"/>
|
||||
</file>
|
||||
<metrics files="1" loc="33" ncloc="33" classes="1" methods="4" coveredmethods="3" conditionals="0" coveredconditionals="0" statements="10" coveredstatements="5" elements="14" coveredelements="8"/>
|
||||
</project>
|
||||
</coverage>
|
33
vendor/phpunit/php-code-coverage/Tests/_files/BankAccount.php
vendored
Normal file
33
vendor/phpunit/php-code-coverage/Tests/_files/BankAccount.php
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
class BankAccount
|
||||
{
|
||||
protected $balance = 0;
|
||||
|
||||
public function getBalance()
|
||||
{
|
||||
return $this->balance;
|
||||
}
|
||||
|
||||
protected function setBalance($balance)
|
||||
{
|
||||
if ($balance >= 0) {
|
||||
$this->balance = $balance;
|
||||
} else {
|
||||
throw new RuntimeException;
|
||||
}
|
||||
}
|
||||
|
||||
public function depositMoney($balance)
|
||||
{
|
||||
$this->setBalance($this->getBalance() + $balance);
|
||||
|
||||
return $this->getBalance();
|
||||
}
|
||||
|
||||
public function withdrawMoney($balance)
|
||||
{
|
||||
$this->setBalance($this->getBalance() - $balance);
|
||||
|
||||
return $this->getBalance();
|
||||
}
|
||||
}
|
70
vendor/phpunit/php-code-coverage/Tests/_files/BankAccountTest.php
vendored
Normal file
70
vendor/phpunit/php-code-coverage/Tests/_files/BankAccountTest.php
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
require_once 'BankAccount.php';
|
||||
|
||||
class BankAccountTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
protected $ba;
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
$this->ba = new BankAccount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers BankAccount::getBalance
|
||||
*/
|
||||
public function testBalanceIsInitiallyZero()
|
||||
{
|
||||
$this->assertEquals(0, $this->ba->getBalance());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers BankAccount::withdrawMoney
|
||||
*/
|
||||
public function testBalanceCannotBecomeNegative()
|
||||
{
|
||||
try {
|
||||
$this->ba->withdrawMoney(1);
|
||||
}
|
||||
|
||||
catch (RuntimeException $e) {
|
||||
$this->assertEquals(0, $this->ba->getBalance());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$this->fail();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers BankAccount::depositMoney
|
||||
*/
|
||||
public function testBalanceCannotBecomeNegative2()
|
||||
{
|
||||
try {
|
||||
$this->ba->depositMoney(-1);
|
||||
}
|
||||
|
||||
catch (RuntimeException $e) {
|
||||
$this->assertEquals(0, $this->ba->getBalance());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$this->fail();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers BankAccount::getBalance
|
||||
* @covers BankAccount::depositMoney
|
||||
* @covers BankAccount::withdrawMoney
|
||||
*/
|
||||
public function testDepositWithdrawMoney()
|
||||
{
|
||||
$this->assertEquals(0, $this->ba->getBalance());
|
||||
$this->ba->depositMoney(1);
|
||||
$this->assertEquals(1, $this->ba->getBalance());
|
||||
$this->ba->withdrawMoney(1);
|
||||
$this->assertEquals(0, $this->ba->getBalance());
|
||||
}
|
||||
}
|
12
vendor/phpunit/php-code-coverage/Tests/_files/CoverageClassExtendedTest.php
vendored
Normal file
12
vendor/phpunit/php-code-coverage/Tests/_files/CoverageClassExtendedTest.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
class CoverageClassExtendedTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers CoveredClass<extended>
|
||||
*/
|
||||
public function testSomething()
|
||||
{
|
||||
$o = new CoveredClass;
|
||||
$o->publicMethod();
|
||||
}
|
||||
}
|
12
vendor/phpunit/php-code-coverage/Tests/_files/CoverageClassTest.php
vendored
Normal file
12
vendor/phpunit/php-code-coverage/Tests/_files/CoverageClassTest.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
class CoverageClassTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers CoveredClass
|
||||
*/
|
||||
public function testSomething()
|
||||
{
|
||||
$o = new CoveredClass;
|
||||
$o->publicMethod();
|
||||
}
|
||||
}
|
11
vendor/phpunit/php-code-coverage/Tests/_files/CoverageFunctionTest.php
vendored
Normal file
11
vendor/phpunit/php-code-coverage/Tests/_files/CoverageFunctionTest.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
class CoverageFunctionTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers ::globalFunction
|
||||
*/
|
||||
public function testSomething()
|
||||
{
|
||||
globalFunction();
|
||||
}
|
||||
}
|
12
vendor/phpunit/php-code-coverage/Tests/_files/CoverageMethodOneLineAnnotationTest.php
vendored
Normal file
12
vendor/phpunit/php-code-coverage/Tests/_files/CoverageMethodOneLineAnnotationTest.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
class CoverageMethodOneLineAnnotationTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/** @covers CoveredClass::publicMethod */
|
||||
public function testSomething()
|
||||
{
|
||||
$o = new CoveredClass;
|
||||
$o->publicMethod();
|
||||
}
|
||||
}
|
||||
|
12
vendor/phpunit/php-code-coverage/Tests/_files/CoverageMethodTest.php
vendored
Normal file
12
vendor/phpunit/php-code-coverage/Tests/_files/CoverageMethodTest.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
class CoverageMethodTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers CoveredClass::publicMethod
|
||||
*/
|
||||
public function testSomething()
|
||||
{
|
||||
$o = new CoveredClass;
|
||||
$o->publicMethod();
|
||||
}
|
||||
}
|
9
vendor/phpunit/php-code-coverage/Tests/_files/CoverageNoneTest.php
vendored
Normal file
9
vendor/phpunit/php-code-coverage/Tests/_files/CoverageNoneTest.php
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
class CoverageNoneTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testSomething()
|
||||
{
|
||||
$o = new CoveredClass;
|
||||
$o->publicMethod();
|
||||
}
|
||||
}
|
12
vendor/phpunit/php-code-coverage/Tests/_files/CoverageNotPrivateTest.php
vendored
Normal file
12
vendor/phpunit/php-code-coverage/Tests/_files/CoverageNotPrivateTest.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
class CoverageNotPrivateTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers CoveredClass::<!private>
|
||||
*/
|
||||
public function testSomething()
|
||||
{
|
||||
$o = new CoveredClass;
|
||||
$o->publicMethod();
|
||||
}
|
||||
}
|
12
vendor/phpunit/php-code-coverage/Tests/_files/CoverageNotProtectedTest.php
vendored
Normal file
12
vendor/phpunit/php-code-coverage/Tests/_files/CoverageNotProtectedTest.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
class CoverageNotProtectedTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers CoveredClass::<!protected>
|
||||
*/
|
||||
public function testSomething()
|
||||
{
|
||||
$o = new CoveredClass;
|
||||
$o->publicMethod();
|
||||
}
|
||||
}
|
12
vendor/phpunit/php-code-coverage/Tests/_files/CoverageNotPublicTest.php
vendored
Normal file
12
vendor/phpunit/php-code-coverage/Tests/_files/CoverageNotPublicTest.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
class CoverageNotPublicTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers CoveredClass::<!public>
|
||||
*/
|
||||
public function testSomething()
|
||||
{
|
||||
$o = new CoveredClass;
|
||||
$o->publicMethod();
|
||||
}
|
||||
}
|
13
vendor/phpunit/php-code-coverage/Tests/_files/CoverageNothingTest.php
vendored
Normal file
13
vendor/phpunit/php-code-coverage/Tests/_files/CoverageNothingTest.php
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
class CoverageNothingTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers CoveredClass::publicMethod
|
||||
* @coversNothing
|
||||
*/
|
||||
public function testSomething()
|
||||
{
|
||||
$o = new CoveredClass;
|
||||
$o->publicMethod();
|
||||
}
|
||||
}
|
12
vendor/phpunit/php-code-coverage/Tests/_files/CoveragePrivateTest.php
vendored
Normal file
12
vendor/phpunit/php-code-coverage/Tests/_files/CoveragePrivateTest.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
class CoveragePrivateTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers CoveredClass::<private>
|
||||
*/
|
||||
public function testSomething()
|
||||
{
|
||||
$o = new CoveredClass;
|
||||
$o->publicMethod();
|
||||
}
|
||||
}
|
12
vendor/phpunit/php-code-coverage/Tests/_files/CoverageProtectedTest.php
vendored
Normal file
12
vendor/phpunit/php-code-coverage/Tests/_files/CoverageProtectedTest.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
class CoverageProtectedTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers CoveredClass::<protected>
|
||||
*/
|
||||
public function testSomething()
|
||||
{
|
||||
$o = new CoveredClass;
|
||||
$o->publicMethod();
|
||||
}
|
||||
}
|
12
vendor/phpunit/php-code-coverage/Tests/_files/CoveragePublicTest.php
vendored
Normal file
12
vendor/phpunit/php-code-coverage/Tests/_files/CoveragePublicTest.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
class CoveragePublicTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers CoveredClass::<public>
|
||||
*/
|
||||
public function testSomething()
|
||||
{
|
||||
$o = new CoveredClass;
|
||||
$o->publicMethod();
|
||||
}
|
||||
}
|
19
vendor/phpunit/php-code-coverage/Tests/_files/CoverageTwoDefaultClassAnnotations.php
vendored
Normal file
19
vendor/phpunit/php-code-coverage/Tests/_files/CoverageTwoDefaultClassAnnotations.php
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @coversDefaultClass \NamespaceOne
|
||||
* @coversDefaultClass \AnotherDefault\Name\Space\Does\Not\Work
|
||||
*/
|
||||
class CoverageTwoDefaultClassAnnotations
|
||||
{
|
||||
|
||||
/**
|
||||
* @covers Foo\CoveredClass::<public>
|
||||
*/
|
||||
public function testSomething()
|
||||
{
|
||||
$o = new Foo\CoveredClass;
|
||||
$o->publicMethod();
|
||||
}
|
||||
|
||||
}
|
36
vendor/phpunit/php-code-coverage/Tests/_files/CoveredClass.php
vendored
Normal file
36
vendor/phpunit/php-code-coverage/Tests/_files/CoveredClass.php
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
class CoveredParentClass
|
||||
{
|
||||
private function privateMethod()
|
||||
{
|
||||
}
|
||||
|
||||
protected function protectedMethod()
|
||||
{
|
||||
$this->privateMethod();
|
||||
}
|
||||
|
||||
public function publicMethod()
|
||||
{
|
||||
$this->protectedMethod();
|
||||
}
|
||||
}
|
||||
|
||||
class CoveredClass extends CoveredParentClass
|
||||
{
|
||||
private function privateMethod()
|
||||
{
|
||||
}
|
||||
|
||||
protected function protectedMethod()
|
||||
{
|
||||
parent::protectedMethod();
|
||||
$this->privateMethod();
|
||||
}
|
||||
|
||||
public function publicMethod()
|
||||
{
|
||||
parent::publicMethod();
|
||||
$this->protectedMethod();
|
||||
}
|
||||
}
|
4
vendor/phpunit/php-code-coverage/Tests/_files/CoveredFunction.php
vendored
Normal file
4
vendor/phpunit/php-code-coverage/Tests/_files/CoveredFunction.php
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
function globalFunction()
|
||||
{
|
||||
}
|
12
vendor/phpunit/php-code-coverage/Tests/_files/NamespaceCoverageClassExtendedTest.php
vendored
Normal file
12
vendor/phpunit/php-code-coverage/Tests/_files/NamespaceCoverageClassExtendedTest.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
class NamespaceCoverageClassExtendedTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers Foo\CoveredClass<extended>
|
||||
*/
|
||||
public function testSomething()
|
||||
{
|
||||
$o = new Foo\CoveredClass;
|
||||
$o->publicMethod();
|
||||
}
|
||||
}
|
12
vendor/phpunit/php-code-coverage/Tests/_files/NamespaceCoverageClassTest.php
vendored
Normal file
12
vendor/phpunit/php-code-coverage/Tests/_files/NamespaceCoverageClassTest.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
class NamespaceCoverageClassTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers Foo\CoveredClass
|
||||
*/
|
||||
public function testSomething()
|
||||
{
|
||||
$o = new Foo\CoveredClass;
|
||||
$o->publicMethod();
|
||||
}
|
||||
}
|
16
vendor/phpunit/php-code-coverage/Tests/_files/NamespaceCoverageCoversClassPublicTest.php
vendored
Normal file
16
vendor/phpunit/php-code-coverage/Tests/_files/NamespaceCoverageCoversClassPublicTest.php
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
/**
|
||||
* @coversDefaultClass \Foo\CoveredClass
|
||||
*/
|
||||
class NamespaceCoverageCoversClassPublicTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers ::publicMethod
|
||||
*/
|
||||
public function testSomething()
|
||||
{
|
||||
$o = new Foo\CoveredClass;
|
||||
$o->publicMethod();
|
||||
}
|
||||
}
|
||||
|
21
vendor/phpunit/php-code-coverage/Tests/_files/NamespaceCoverageCoversClassTest.php
vendored
Normal file
21
vendor/phpunit/php-code-coverage/Tests/_files/NamespaceCoverageCoversClassTest.php
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* @coversDefaultClass \Foo\CoveredClass
|
||||
*/
|
||||
class NamespaceCoverageCoversClassTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers ::privateMethod
|
||||
* @covers ::protectedMethod
|
||||
* @covers ::publicMethod
|
||||
* @covers \Foo\CoveredParentClass::privateMethod
|
||||
* @covers \Foo\CoveredParentClass::protectedMethod
|
||||
* @covers \Foo\CoveredParentClass::publicMethod
|
||||
*/
|
||||
public function testSomething()
|
||||
{
|
||||
$o = new Foo\CoveredClass;
|
||||
$o->publicMethod();
|
||||
}
|
||||
}
|
||||
|
12
vendor/phpunit/php-code-coverage/Tests/_files/NamespaceCoverageMethodTest.php
vendored
Normal file
12
vendor/phpunit/php-code-coverage/Tests/_files/NamespaceCoverageMethodTest.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
class NamespaceCoverageMethodTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers Foo\CoveredClass::publicMethod
|
||||
*/
|
||||
public function testSomething()
|
||||
{
|
||||
$o = new Foo\CoveredClass;
|
||||
$o->publicMethod();
|
||||
}
|
||||
}
|
12
vendor/phpunit/php-code-coverage/Tests/_files/NamespaceCoverageNotPrivateTest.php
vendored
Normal file
12
vendor/phpunit/php-code-coverage/Tests/_files/NamespaceCoverageNotPrivateTest.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
class NamespaceCoverageNotPrivateTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers Foo\CoveredClass::<!private>
|
||||
*/
|
||||
public function testSomething()
|
||||
{
|
||||
$o = new Foo\CoveredClass;
|
||||
$o->publicMethod();
|
||||
}
|
||||
}
|
12
vendor/phpunit/php-code-coverage/Tests/_files/NamespaceCoverageNotProtectedTest.php
vendored
Normal file
12
vendor/phpunit/php-code-coverage/Tests/_files/NamespaceCoverageNotProtectedTest.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
class NamespaceCoverageNotProtectedTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers Foo\CoveredClass::<!protected>
|
||||
*/
|
||||
public function testSomething()
|
||||
{
|
||||
$o = new Foo\CoveredClass;
|
||||
$o->publicMethod();
|
||||
}
|
||||
}
|
12
vendor/phpunit/php-code-coverage/Tests/_files/NamespaceCoverageNotPublicTest.php
vendored
Normal file
12
vendor/phpunit/php-code-coverage/Tests/_files/NamespaceCoverageNotPublicTest.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
class NamespaceCoverageNotPublicTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers Foo\CoveredClass::<!public>
|
||||
*/
|
||||
public function testSomething()
|
||||
{
|
||||
$o = new Foo\CoveredClass;
|
||||
$o->publicMethod();
|
||||
}
|
||||
}
|
12
vendor/phpunit/php-code-coverage/Tests/_files/NamespaceCoveragePrivateTest.php
vendored
Normal file
12
vendor/phpunit/php-code-coverage/Tests/_files/NamespaceCoveragePrivateTest.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
class NamespaceCoveragePrivateTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers Foo\CoveredClass::<private>
|
||||
*/
|
||||
public function testSomething()
|
||||
{
|
||||
$o = new Foo\CoveredClass;
|
||||
$o->publicMethod();
|
||||
}
|
||||
}
|
12
vendor/phpunit/php-code-coverage/Tests/_files/NamespaceCoverageProtectedTest.php
vendored
Normal file
12
vendor/phpunit/php-code-coverage/Tests/_files/NamespaceCoverageProtectedTest.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
class NamespaceCoverageProtectedTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers Foo\CoveredClass::<protected>
|
||||
*/
|
||||
public function testSomething()
|
||||
{
|
||||
$o = new Foo\CoveredClass;
|
||||
$o->publicMethod();
|
||||
}
|
||||
}
|
12
vendor/phpunit/php-code-coverage/Tests/_files/NamespaceCoveragePublicTest.php
vendored
Normal file
12
vendor/phpunit/php-code-coverage/Tests/_files/NamespaceCoveragePublicTest.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
class NamespaceCoveragePublicTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers Foo\CoveredClass::<public>
|
||||
*/
|
||||
public function testSomething()
|
||||
{
|
||||
$o = new Foo\CoveredClass;
|
||||
$o->publicMethod();
|
||||
}
|
||||
}
|
38
vendor/phpunit/php-code-coverage/Tests/_files/NamespaceCoveredClass.php
vendored
Normal file
38
vendor/phpunit/php-code-coverage/Tests/_files/NamespaceCoveredClass.php
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
namespace Foo;
|
||||
|
||||
class CoveredParentClass
|
||||
{
|
||||
private function privateMethod()
|
||||
{
|
||||
}
|
||||
|
||||
protected function protectedMethod()
|
||||
{
|
||||
$this->privateMethod();
|
||||
}
|
||||
|
||||
public function publicMethod()
|
||||
{
|
||||
$this->protectedMethod();
|
||||
}
|
||||
}
|
||||
|
||||
class CoveredClass extends CoveredParentClass
|
||||
{
|
||||
private function privateMethod()
|
||||
{
|
||||
}
|
||||
|
||||
protected function protectedMethod()
|
||||
{
|
||||
parent::protectedMethod();
|
||||
$this->privateMethod();
|
||||
}
|
||||
|
||||
public function publicMethod()
|
||||
{
|
||||
parent::publicMethod();
|
||||
$this->protectedMethod();
|
||||
}
|
||||
}
|
24
vendor/phpunit/php-code-coverage/Tests/_files/NotExistingCoveredElementTest.php
vendored
Normal file
24
vendor/phpunit/php-code-coverage/Tests/_files/NotExistingCoveredElementTest.php
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
class NotExistingCoveredElementTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers NotExistingClass
|
||||
*/
|
||||
public function testOne()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers NotExistingClass::notExistingMethod
|
||||
*/
|
||||
public function testTwo()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers NotExistingClass::<public>
|
||||
*/
|
||||
public function testThree()
|
||||
{
|
||||
}
|
||||
}
|
17
vendor/phpunit/php-code-coverage/Tests/_files/ignored-lines-clover.xml
vendored
Normal file
17
vendor/phpunit/php-code-coverage/Tests/_files/ignored-lines-clover.xml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<coverage generated="%i">
|
||||
<project timestamp="%i">
|
||||
<file name="%s/source_with_ignore.php">
|
||||
<class name="Foo" namespace="global">
|
||||
<metrics methods="1" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="0" coveredstatements="0" elements="1" coveredelements="0"/>
|
||||
</class>
|
||||
<class name="Bar" namespace="global">
|
||||
<metrics methods="1" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="0" coveredstatements="0" elements="1" coveredelements="0"/>
|
||||
</class>
|
||||
<line num="2" type="stmt" count="1"/>
|
||||
<line num="6" type="stmt" count="0"/>
|
||||
<metrics loc="38" ncloc="26" classes="2" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="2" coveredstatements="1" elements="2" coveredelements="1"/>
|
||||
</file>
|
||||
<metrics files="1" loc="38" ncloc="26" classes="2" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="2" coveredstatements="1" elements="2" coveredelements="1"/>
|
||||
</project>
|
||||
</coverage>
|
38
vendor/phpunit/php-code-coverage/Tests/_files/source_with_ignore.php
vendored
Normal file
38
vendor/phpunit/php-code-coverage/Tests/_files/source_with_ignore.php
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
if ($neverHappens) {
|
||||
// @codeCoverageIgnoreStart
|
||||
print '*';
|
||||
// @codeCoverageIgnoreEnd
|
||||
}
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class Foo
|
||||
{
|
||||
public function bar()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
class Bar
|
||||
{
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function foo()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
function baz()
|
||||
{
|
||||
print '*'; // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
interface Bor {
|
||||
|
||||
public function foo();
|
||||
|
||||
}
|
||||
|
20
vendor/phpunit/php-code-coverage/Tests/_files/source_with_namespace.php
vendored
Normal file
20
vendor/phpunit/php-code-coverage/Tests/_files/source_with_namespace.php
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
namespace bar\baz;
|
||||
|
||||
/**
|
||||
* Represents foo.
|
||||
*/
|
||||
class Foo
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $bar
|
||||
*/
|
||||
function &foo($bar)
|
||||
{
|
||||
$baz = function() {};
|
||||
$a = TRUE ? TRUE : FALSE;
|
||||
$b = "{$a}";
|
||||
$c = "${b}";
|
||||
}
|
13
vendor/phpunit/php-code-coverage/Tests/_files/source_with_oneline_annotations.php
vendored
Normal file
13
vendor/phpunit/php-code-coverage/Tests/_files/source_with_oneline_annotations.php
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
/** Docblock */
|
||||
interface {
|
||||
public function bar();
|
||||
}
|
||||
|
||||
class Foo
|
||||
{
|
||||
public function bar()
|
||||
{
|
||||
}
|
||||
}
|
4
vendor/phpunit/php-code-coverage/Tests/_files/source_without_ignore.php
vendored
Normal file
4
vendor/phpunit/php-code-coverage/Tests/_files/source_without_ignore.php
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
if ($neverHappens) {
|
||||
print '*';
|
||||
}
|
18
vendor/phpunit/php-code-coverage/Tests/_files/source_without_namespace.php
vendored
Normal file
18
vendor/phpunit/php-code-coverage/Tests/_files/source_without_namespace.php
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/**
|
||||
* Represents foo.
|
||||
*/
|
||||
class Foo
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $bar
|
||||
*/
|
||||
function &foo($bar)
|
||||
{
|
||||
$baz = function() {};
|
||||
$a = TRUE ? TRUE : FALSE;
|
||||
$b = "{$a}";
|
||||
$c = "${b}";
|
||||
}
|
Reference in New Issue
Block a user