PHP Classes

File: tests/ErrorCodeTest.php

Recommend this page to a friend!
  Packages of Scott Arciszewski   EasyDB   tests/ErrorCodeTest.php   Download  
File: tests/ErrorCodeTest.php
Role: Class source
Content type: text/plain
Description: Class source
Class: EasyDB
Simple Database Abstraction Layer around PDO
Author: By
Last change: Test Improvements + Mutation Testing (#168)

* Update testing frameworks
* Add infection for mutation tests
* Modernize PHPUnit usage
Date: 2 months ago
Size: 732 bytes
 

Contents

Class file image Download
<?php
declare(strict_types=1);

namespace
ParagonIE\EasyDB\Tests;

use
ParagonIE\EasyDB\EasyDB;
use
ParagonIE\EasyDB\Factory;
use
PHPUnit\Framework\Attributes\CoversClass;
use
PHPUnit\Framework\Attributes\DataProvider;

/**
 * Class EasyDBTestCase
 * @package ParagonIE\EasyDB\Tests
 */
#[CoversClass(EasyDB::class)]
#[CoversClass(Factory::class)]
class ErrorCodeTest extends EasyDBTestCase
{

   
/**
     * @param callable $cb
     * @dataProvider goodFactoryCreateArgument2EasyDBProvider
     */
    #[DataProvider("goodFactoryCreateArgument2EasyDBProvider")]
   
public function testNoError(callable $cb)
    {
       
$db = $this->easyDBExpectedFromCallable($cb);

       
$this->assertSame($db->errorCode(), '00000');
    }
}