Skip to content

Latest commit

 

History

History
158 lines (84 loc) · 1.93 KB

File metadata and controls

158 lines (84 loc) · 1.93 KB
layout doc
title Codeception - Documentation

Filesystem Module

For additional reference, please review the source

Module for testing local filesystem. Fork it to extend the module for FTP, Amazon S3, others.

Status

Module was developed to test Codeception itself.

Actions

amInPath

Enters a directory In local filesystem. Project root directory is used by default

  • param $path

copyDir

Copies directory with all contents

{% highlight php %}

copyDir('vendor','old_vendor'); ?>

{% endhighlight %}

  • param $src
  • param $dst

deleteDir

Deletes directory with all subdirectories

{% highlight php %}

deleteDir('vendor'); ?>

{% endhighlight %}

  • param $dirname

deleteFile

Deletes a file

{% highlight php %}

deleteFile('composer.lock'); ?>

{% endhighlight %}

  • param $filename

deleteThisFile

Deletes a file

dontSeeInThisFile

Checks If opened file doesn't contain text in it

{% highlight php %}

openFile('composer.json'); $I->seeInThisFile('codeception/codeception'); ?>

{% endhighlight %}

  • param $text

openFile

Opens a file and stores it's content.

Usage:

{% highlight php %}

openFile('composer.json'); $I->seeInThisFile('codeception/codeception'); ?>

{% endhighlight %}

  • param $filename

seeFileFound

Checks if file exists in path. Opens a file when it's exists

{% highlight php %}

seeFileFound('UserModel.php','app/models'); ?>

{% endhighlight %}

  • param $filename
  • param string $path

seeInThisFile

Checks If opened file has text in it.

Usage:

{% highlight php %}

openFile('composer.json'); $I->seeInThisFile('codeception/codeception'); ?>

{% endhighlight %}

  • param $text