CodeIgniter v4.5 API

test_helper.php

This file is part of CodeIgniter 4 framework.

(c) CodeIgniter Foundation admin@codeigniter.com

For the full copyright and license information, please view the LICENSE file that was distributed with this source code.

Table of Contents

Functions

fake()  : array<string|int, mixed>|object
Creates a single item using Fabricator.
mock()  : object
Used within our test suite to mock certain system tools.

Functions

fake()

Creates a single item using Fabricator.

fake(Model|object|string $model[, array<string|int, mixed>|null $overrides = null ][, bool $persist = true ]) : array<string|int, mixed>|object
Parameters
$model : Model|object|string

Instance or name of the model

$overrides : array<string|int, mixed>|null = null

Overriding data to pass to Fabricator::setOverrides()

$persist : bool = true
Return values
array<string|int, mixed>|object

mock()

Used within our test suite to mock certain system tools.

mock(string $className) : object
Parameters
$className : string

Fully qualified class name

Return values
object

        
On this page

Search results