Hubwiz.com
|
Online Course
|
API Manual
PHPUnit API Manual
Guide(18)
Annotation(31)
Section(97)
Function(46)
Guide
PHPUnit Manual
Bibliography
Writing Tests for PHPUnit
Copyright
Database Testing
Risky Tests
Incomplete and Skipped Tests
The Command-Line Test Runner
Extending PHPUnit
Assertions
Test Doubles
Installing PHPUnit
Fixtures
The XML Configuration File
Logging
Annotations
Organizing Tests
Code Coverage Analysis
Annotation
@runInSeparateProcess
@expectedExceptionMessageRegExp
@expectedException
@test
@testdox
@depends
@coversNothing
@after
@large
@afterClass
@coversDefaultClass
@covers
@backupGlobals
@expectedExceptionCode
@uses
@codeCoverageIgnore*
@runTestsInSeparateProcesses
@preserveGlobalState
@beforeClass
@backupStaticAttributes
@group
@dataProvider
@testWith
@medium
@expectedExceptionMessage
@requires
@before
@doesNotPerformAssertions
@author
@small
@ticket
Section
Skipping Tests
Incomplete Tests
Specifying Covered Methods
Requirements
Test Suites
Database (DB) Dataset
Output During Test Execution
Implement PHPUnit\Framework\TestListener
3–5. Run Test, Verify outcome and Teardown
Command-Line Options
Asserting the State of a Table
Array DataSet
Prophecy
Beware of Foreign Keys
Implementing getDataSet()
Implement PHPUnitFrameworkTest
Frequently Asked Questions
Supported Vendors for Database Testing
Difficulties in Database Testing
Whitelisting Files
Logging
Asserting the State of Multiple Tables
What can I do, when I get a “Too much Connections“ Error?
Setting PHP INI settings, Constants and Global Variables
Available Implementations
Asserting the Result of a Query
Database Assertions API
Extending the TestRunner
Whitelisting Files for Code Coverage
Groups
Composing a Test Suite Using the Filesystem
Static vs. Non-Static Usage of Assertion Methods
Am I required to use PDO in my application for the Database Extension to work?
Testing PHP Errors
Available Hook Interfaces
Edge cases
Asserting the Row-Count of a Table
Optional packages
Test Dependencies
TestDox
Test Results (XML)
Useless Tests
Understanding DataSets and DataTables
YAML DataSet
Will PHPUnit (re-)create the database schema for each test?
PHP Archive (PHAR)
Query (SQL) DataSet
1. Clean-Up Database
Stubs
Ignoring Code Blocks
Search Page
CSV DataSet
Code Coverage (TEXT)
Implementing getConnection()
How to handle NULL with Flat XML / CSV Datasets?
Composing a Test Suite Using XML Configuration
Testing Exceptions
2. Set up fixture
Replacement DataSet
Sharing Fixture
Variations
Skipping Tests using @requires
Error output
More setUp() than tearDown()
Index
Test Listeners
Using the Database Connection API
Software Metrics for Code Coverage
Implementing your own DataSets/DataTables
Edge Cases
The four stages of a database test
DataSet Filter
Flat XML DataSet
Data Providers
Composer
Mock Objects
Unintentionally Covered Code
Global State Manipulation
Subclass PHPUnit\Framework\TestCase
Global State
Tip: Use your own Abstract Database TestCase
Testing Output
PHPUnit
Test Execution Timeout
Windows
MySQL XML DataSet
Verifying PHPUnit PHAR Releases
XML DataSet
Registering TestRunner Extensions
Configuration of a PHPUnit Database TestCase
Mocking the Filesystem
Mocking Traits and Abstract Classes
Stubbing and Mocking Web Services
Code Coverage (XML)
What about the Database Schema (DDL)?
Composite DataSet
Write custom assertions
Function
assertStringEqualsFile()
assertStringMatchesFormatFile()
assertGreaterThanOrEqual()
assertJsonStringEqualsJsonString()
assertXmlStringEqualsXmlFile()
assertDirectoryExists()
assertStringStartsWith()
assertArraySubset()
assertArrayHasKey()
assertTrue()
assertIsReadable()
assertClassHasAttribute()
assertXmlStringEqualsXmlString()
assertIsWritable()
assertFileEquals()
assertContainsOnly()
assertInternalType()
assertStringEndsWith()
assertCount()
assertRegExp()
assertXmlFileEqualsXmlFile()
assertDirectoryIsReadable()
assertEqualXMLStructure()
assertFalse()
assertInstanceOf()
assertNull()
assertClassHasStaticAttribute()
assertNan()
assertThat()
assertFileIsReadable()
assertEquals()
assertFileExists()
assertLessThan()
assertLessThanOrEqual()
assertDirectoryIsWritable()
assertObjectHasAttribute()
assertEmpty()
assertJsonFileEqualsJsonFile()
assertContains()
assertFileIsWritable()
assertInfinite()
assertJsonStringEqualsJsonFile()
assertGreaterThan()
assertSame()
assertStringMatchesFormat()
assertContainsOnlyInstancesOf()