Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions test/unit/FilesExistTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

namespace SendGrid\Test;

class FilesExistTest extends \PHPUnit_Framework_TestCase
{
public function testFileArePresentInRepo()
{
$this->assertFileExists('./.gitignore');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was 1 failure:
1) SendGrid\Test\FilesExistTest::testFileArePresentInRepo
Failed asserting that file "./.gitignore" exists.
/home/travis/build/sendgrid/php-http-client/test/unit/FilesExistTest.php:9

I am wondering if PHP is not checking the root directory, but in fact, checking the test file's directory?
Can you please try outputting the directory here to test and fixing the file paths accordingly?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup, will try to do it asap

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

$this->assertFileExists('./.env_sample');
$this->assertFileExists('./.travis.yml');
$this->assertFileExists('./.codeclimate.yml');
$this->assertFileExists('./CHANGELOG.md');
$this->assertFileExists('./CODE_OF_CONDUCT.md');
$this->assertFileExists('./CONTRIBUTING.md');
$this->assertFileExists('./.github/ISSUE_TEMPLATE');
$this->assertFileExists('./LICENSE.md');
$this->assertFileExists('./.github/PULL_REQUEST_TEMPLATE');
$this->assertFileExists('./README.md');
$this->assertFileExists('./TROUBLESHOOTING.md');
$this->assertFileExists('./USAGE.md');
$this->assertFileExists('./USE_CASES.md');

$composeExists = file_exists('./docker-compose.yml') || file_exists('./docker/docker-compose.yml');
$this->assertTrue($composeExists);

$dockerExists = file_exists('./Docker') || file_exists('./docker/Docker');
$this->assertTrue($dockerExists);
}
}