77 lines
2.8 KiB
YAML
77 lines
2.8 KiB
YAML
uuid:
|
|
- value: b4a61b67-5a6e-4b9f-87c9-95cf1b38df5e
|
|
langcode:
|
|
- value: en
|
|
type:
|
|
- target_id: daily_email
|
|
target_type: node_type
|
|
target_uuid: 8bde1f2f-eef9-4f2d-ae9c-96921f8193d7
|
|
revision_timestamp:
|
|
- value: '2025-05-11T09:00:28+00:00'
|
|
revision_uid:
|
|
- target_type: user
|
|
target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849
|
|
revision_log: { }
|
|
status:
|
|
- value: true
|
|
uid:
|
|
- target_type: user
|
|
target_uuid: b8966985-d4b2-42a7-a319-2e94ccfbb849
|
|
title:
|
|
- value: |
|
|
PHPUnit does more than unit testing
|
|
created:
|
|
- value: '2023-11-13T00:00:00+00:00'
|
|
changed:
|
|
- value: '2025-05-11T09:00:28+00:00'
|
|
promote:
|
|
- value: false
|
|
sticky:
|
|
- value: false
|
|
default_langcode:
|
|
- value: true
|
|
revision_translation_affected:
|
|
- value: true
|
|
path:
|
|
- alias: /daily/2023/11/13/phpunit-does-more-than-unit-testing
|
|
langcode: en
|
|
body:
|
|
- value: |
|
|
<p>As the name suggests, <a href="http://phpunit.de">PHPUnit</a> is a unit testing framework for PHP.</p>
|
|
|
|
<p>It's the defacto PHP testing framework used by the major PHP projects, such as Drupal, Symfony, Laravel.</p>
|
|
|
|
<p>But unit testing isn't all that PHPUnit can do.</p>
|
|
|
|
<p>These frameworks extend PHPUnit to give it more functionality.</p>
|
|
|
|
<p>Drupal allows you to run functional/browser tests to make requests to pages, check the response codes and content, as well as integration/kernel tests to test real services instead of relying on mocking within unit tests.</p>
|
|
|
|
<p>Symfony does the same with its web and kernel test cases.</p>
|
|
|
|
<h2 id="here%27s-the-thing">Here's the thing</h2>
|
|
|
|
<p>If you use a framework and want to more than unit testing, intsead of including another testing framework, try using some of the PHPUnit extensions that are provided by the framework.</p>
|
|
|
|
|
|
format: full_html
|
|
processed: |
|
|
<p>As the name suggests, <a href="http://phpunit.de">PHPUnit</a> is a unit testing framework for PHP.</p>
|
|
|
|
<p>It's the defacto PHP testing framework used by the major PHP projects, such as Drupal, Symfony, Laravel.</p>
|
|
|
|
<p>But unit testing isn't all that PHPUnit can do.</p>
|
|
|
|
<p>These frameworks extend PHPUnit to give it more functionality.</p>
|
|
|
|
<p>Drupal allows you to run functional/browser tests to make requests to pages, check the response codes and content, as well as integration/kernel tests to test real services instead of relying on mocking within unit tests.</p>
|
|
|
|
<p>Symfony does the same with its web and kernel test cases.</p>
|
|
|
|
<h2 id="here%27s-the-thing">Here's the thing</h2>
|
|
|
|
<p>If you use a framework and want to more than unit testing, intsead of including another testing framework, try using some of the PHPUnit extensions that are provided by the framework.</p>
|
|
|
|
|
|
summary: null
|
|
field_daily_email_cta: { }
|