Skip to content

Commit 57a382a

Browse files
Initial commit
0 parents  commit 57a382a

8 files changed

+119
-0
lines changed

.editorconfig

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
[*]
7+
indent_style = space
8+
indent_size = 4
9+
end_of_line = lf
10+
charset = utf-8
11+
trim_trailing_whitespace = false
12+
insert_final_newline = false

.gitattributes

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Path-based git attributes
2+
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
3+
4+
# Ignore all test and documentation with "export-ignore".
5+
/.gitattributes export-ignore
6+
/.gitignore export-ignore
7+
/.travis.yml export-ignore
8+
/phpunit.xml.dist export-ignore
9+
/.scrutinizer.yml export-ignore
10+
/tests export-ignore
11+
/.editorconfig export-ignore
12+
/.styleci.yml export-ignore

.gitignore

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/vendor
2+
.vscode/
3+
.phpunit.result.cache
4+
xdebug.log
5+
.env
6+
.env.testing
7+
.env.backup
8+
build
9+
composer.lock
10+
vendor
11+
tests/temp
12+
.idea
13+
.phpunit.result.cache
14+
.php-cs-fixer.cache

Makefile

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
COMPOSER_CONTAINER_NAME=prooph/composer:8.0
2+
DOCKER_RUN_COMPOSER_COMMAND=docker run --rm -it --volume $(shell pwd):/app $(COMPOSER_CONTAINER_NAME)
3+
4+
.PHONY: nop
5+
nop:
6+
@echo "Please pass a target you want to run"
7+
8+
.PHONY: install
9+
install:
10+
$(DOCKER_RUN_COMPOSER_COMMAND) install
11+
12+
.PHONY: test
13+
test:
14+
$(DOCKER_RUN_COMPOSER_COMMAND) test

composer.json

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "trebla/package",
3+
"description": "Package description.",
4+
"require": {
5+
"php": "^7.2.5|^8.0"
6+
},
7+
"require-dev": {
8+
"orchestra/testbench": "^4.0|^5.0|^6.0",
9+
"phpunit/phpunit": "^8.0|^9.0"
10+
},
11+
"autoload": {
12+
"psr-4": {
13+
"Trebla\\Package\\": "src"
14+
}
15+
},
16+
"autoload-dev": {
17+
"psr-4": {
18+
"Trebla\\Package\\Test\\": "tests"
19+
}
20+
},
21+
"scripts": {
22+
"test": "phpunit"
23+
},
24+
"config": {
25+
"sort-packages": true
26+
},
27+
"minimum-stability": "dev",
28+
"prefer-stable": true
29+
}

phpunit.xml.dist

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" backupStaticAttributes="false" colors="true" verbose="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
3+
<coverage>
4+
<include>
5+
<directory suffix=".php">src/</directory>
6+
</include>
7+
</coverage>
8+
<testsuites>
9+
<testsuite name="PHP Test Suite">
10+
<directory>tests</directory>
11+
</testsuite>
12+
</testsuites>
13+
<php>
14+
<env name="APP_ENV" value="testing" force="true" />
15+
</php>
16+
</phpunit>

src/App/Main.php

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
namespace Trebla\Package\App;
4+
5+
class Main
6+
{
7+
//
8+
}

tests/ExampleTest.php

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
namespace Trebla\Package\Test;
4+
5+
use PHPUnit\Framework\TestCase;
6+
7+
class ExampleTest extends TestCase
8+
{
9+
/** @test */
10+
public function it_is_a_basic_test()
11+
{
12+
$this->assertTrue(true);
13+
}
14+
}

0 commit comments

Comments
 (0)