Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Learning Yii Testing
  • Table Of Contents Toc
Learning Yii Testing

Learning Yii Testing

By : Pescarin
4 (1)
close
close
Learning Yii Testing

Learning Yii Testing

4 (1)
By: Pescarin

Overview of this book

Developers who have a solid pre-existing knowledge of Yii's core concepts will find this book an ideal introduction to learning to write tests using Yii 2's tools. You'll learn to create faster and more reliable applications with less time and effort.
Table of Contents (11 chapters)
close
close
10
Index

Interacting with Codeception

So far, we've seen two arguments of the codecept command:

  • build: This is used for building the "testers" and any additional code when using any additional module
  • run: This is used to execute the tests

There are a few parameters you can invoke run with that I'd like to bring to your attention, as these will come handy when running and debugging the tests. The syntax of the run command is as follows:

$ vendor/bin/codecept run [options] [suite] [test]

First of all, you can run a specific suite, such as unit, acceptance, or functional, or be more specific and run a single test file, for example:

$ ../vendor/bin/codecept run acceptance LoginCept.php

Time: 3.35 seconds, Memory: 13.75Mb

OK (1 test, 5 assertions)

In the preceding command, you can also use the --steps option, which is a way to be more verbose showing all the single steps taken by your tests while running them.

Alternatively, you also have --debug, which will not only show the...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Learning Yii Testing
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon