瀏覽代碼

init dummy

Fabian Peter Hammerle 8 年之前
當前提交
ab9451933e
共有 8 個文件被更改,包括 91 次插入0 次删除
  1. 3 0
      .gitignore
  2. 12 0
      .travis.yml
  3. 14 0
      ClientCertAuth.php
  4. 21 0
      LICENSE
  5. 2 0
      README.md
  6. 21 0
      composer.json
  7. 7 0
      phpunit.xml
  8. 11 0
      tests/ArrayHelperTest.php

+ 3 - 0
.gitignore

@@ -0,0 +1,3 @@
+/vendor/
+composer.lock
+composer.phar

+ 12 - 0
.travis.yml

@@ -0,0 +1,12 @@
+language: php
+
+php:
+  - '5.4'
+  - '5.5'
+  - '5.6'
+  - '7.0'
+  - nightly
+
+install: composer install
+
+script: phpunit --verbose

+ 14 - 0
ClientCertAuth.php

@@ -0,0 +1,14 @@
+<?php
+
+namespace fphammerle\yii2;
+
+class ClientCertAuth
+{
+    /**
+     * @return string
+     */
+    public static function foo()
+    {
+        return 'bar';
+    }
+}

+ 21 - 0
LICENSE

@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2017 Fabian Peter Hammerle
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 2 - 0
README.md

@@ -0,0 +1,2 @@
+[![PHP version](https://badge.fury.io/ph/fphammerle%2Fyii2-client-cert-auth.svg)](https://badge.fury.io/ph/fphammerle%2Fyii2-client-cert-auth)
+[![Build Status](https://travis-ci.org/fphammerle/yii2-client-cert-auth.svg?branch=master)](https://travis-ci.org/fphammerle/yii2-client-cert-auth)

+ 21 - 0
composer.json

@@ -0,0 +1,21 @@
+{
+    "name": "fphammerle/yii2-client-cert-auth",
+    "description": "",
+    "authors" : [
+        {
+            "name": "Fabian Peter Hammerle",
+            "email": "fabian.hammerle@gmail.com"
+        }
+    ],
+    "require": {
+        "php": ">=5.4.0"
+    },
+    "require-dev": {
+        "phpunit/phpunit": "4.8.*"
+    },
+    "autoload": {
+        "psr-4": {
+            "fphammerle\\yii2\\": ""
+        }
+    }
+}

+ 7 - 0
phpunit.xml

@@ -0,0 +1,7 @@
+<phpunit bootstrap="vendor/autoload.php">
+  <testsuites>
+    <testsuite name="helpers">
+      <directory>tests</directory>
+    </testsuite>
+  </testsuites>
+</phpunit>

+ 11 - 0
tests/ArrayHelperTest.php

@@ -0,0 +1,11 @@
+<?php
+
+use fphammerle\yii2\ClientCertAuth;
+
+class ClientCertAuthTest extends \PHPUnit_Framework_TestCase
+{
+    public function testFlattenEmpty()
+    {
+        $this->assertEquals('bar', ClientCertAuth::foo());
+    }
+}