Skip to content

Commit aa8dda8

Browse files
author
Matt Bernier
authored
Merge pull request sendgrid#60 from micheleorselli/unittest_check_files
Adds unit test for checking file existence in repo
2 parents cce2f43 + ccc4189 commit aa8dda8

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

test/unit/FilesExistTest.php

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
3+
namespace SendGrid\Test;
4+
5+
class FilesExistTest extends \PHPUnit_Framework_TestCase
6+
{
7+
public function testFileArePresentInRepo()
8+
{
9+
$rootDir = __DIR__ . '/../..';
10+
11+
$this->assertFileExists("$rootDir/.gitignore");
12+
$this->assertFileExists("$rootDir/.env_sample");
13+
$this->assertFileExists("$rootDir/.travis.yml");
14+
$this->assertFileExists("$rootDir/.codeclimate.yml");
15+
$this->assertFileExists("$rootDir/CHANGELOG.md");
16+
$this->assertFileExists("$rootDir/CODE_OF_CONDUCT.md");
17+
$this->assertFileExists("$rootDir/CONTRIBUTING.md");
18+
$this->assertFileExists("$rootDir/.github/ISSUE_TEMPLATE");
19+
$this->assertFileExists("$rootDir/LICENSE.md");
20+
$this->assertFileExists("$rootDir/.github/PULL_REQUEST_TEMPLATE");
21+
$this->assertFileExists("$rootDir/README.md");
22+
$this->assertFileExists("$rootDir/TROUBLESHOOTING.md");
23+
$this->assertFileExists("$rootDir/USAGE.md");
24+
$this->assertFileExists("$rootDir/USE_CASES.md");
25+
26+
$composeExists = file_exists('./docker-compose.yml') || file_exists('./docker/docker-compose.yml');
27+
$this->assertTrue($composeExists);
28+
29+
$dockerExists = file_exists('./Docker') || file_exists('./docker/Docker');
30+
$this->assertTrue($dockerExists);
31+
}
32+
}
33+

0 commit comments

Comments
 (0)